@componentor/fs 3.0.26 → 3.0.28

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.
@@ -938,8 +938,7 @@ var VFSEngine = class {
938
938
  const mode = DEFAULT_DIR_MODE & ~(this.umask & 511);
939
939
  this.createInode(path, INODE_TYPE.DIRECTORY, mode, 0);
940
940
  this.commitPending();
941
- const pathBytes = encoder.encode(path);
942
- return { status: 0, data: pathBytes };
941
+ return { status: 0, data: null };
943
942
  }
944
943
  mkdirRecursive(path) {
945
944
  const parts = path.split("/").filter(Boolean);
@@ -1684,10 +1683,20 @@ var OPFSEngine = class {
1684
1683
  if (recursive) {
1685
1684
  const parts = path.split("/").filter(Boolean);
1686
1685
  let dir = this.rootDir;
1686
+ let firstCreated = null;
1687
+ let current = "";
1687
1688
  for (const part of parts) {
1688
- dir = await dir.getDirectoryHandle(part, { create: true });
1689
+ current += "/" + part;
1690
+ let existed = true;
1691
+ try {
1692
+ dir = await dir.getDirectoryHandle(part);
1693
+ } catch {
1694
+ existed = false;
1695
+ dir = await dir.getDirectoryHandle(part, { create: true });
1696
+ }
1697
+ if (!existed && !firstCreated) firstCreated = current;
1689
1698
  }
1690
- return { status: OK, data: encoder2.encode(path) };
1699
+ return { status: OK, data: firstCreated ? encoder2.encode(firstCreated) : null };
1691
1700
  }
1692
1701
  const nav = await this.navigateToParent(path);
1693
1702
  if (!nav) return { status: ENOENT, data: null };
@@ -1698,7 +1707,7 @@ var OPFSEngine = class {
1698
1707
  } catch {
1699
1708
  }
1700
1709
  await nav.dir.getDirectoryHandle(nav.name, { create: true });
1701
- return { status: OK, data: encoder2.encode(path) };
1710
+ return { status: OK, data: null };
1702
1711
  } catch {
1703
1712
  return { status: ENOENT, data: null };
1704
1713
  }