memfs 3.4.9 → 3.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/volume.js +2 -2
  2. package/package.json +1 -1
package/lib/volume.js CHANGED
@@ -1244,7 +1244,7 @@ var Volume = /** @class */ (function () {
1244
1244
  var realLink = this.getResolvedLink(steps);
1245
1245
  if (!realLink)
1246
1246
  throw createError(ENOENT, 'realpath', filename);
1247
- return (0, encoding_1.strToEncoding)(realLink.getPath(), encoding);
1247
+ return (0, encoding_1.strToEncoding)(realLink.getPath() || '/', encoding);
1248
1248
  };
1249
1249
  Volume.prototype.realpathSync = function (path, options) {
1250
1250
  return this.realpathBase(pathToFilename(path), getRealpathOptions(options).encoding);
@@ -1697,7 +1697,7 @@ var Volume = /** @class */ (function () {
1697
1697
  this.wrapAsync(this.fchmodBase, [fd, modeToNumber(mode)], callback);
1698
1698
  };
1699
1699
  Volume.prototype.chmodBase = function (filename, modeNum) {
1700
- var fd = this.openSync(filename, 'r+');
1700
+ var fd = this.openSync(filename, 'r');
1701
1701
  try {
1702
1702
  this.fchmodBase(fd, modeNum);
1703
1703
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memfs",
3
- "version": "3.4.9",
3
+ "version": "3.4.11",
4
4
  "description": "In-memory file-system with Node's fs API.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",