@ai-ecoverse/slicc-kernel 1.70.0 → 1.71.1

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.
@@ -1818,6 +1818,7 @@ var init_wasi_fds = __esm({
1818
1818
  }
1819
1819
  }
1820
1820
  resolve(dirfd, path) {
1821
+ if (path === "") throw new WasiError("ENOENT");
1821
1822
  const joined2 = path.startsWith("/") ? path : `${this.dir(dirfd).path}/${path}`;
1822
1823
  return joined2.split("/").includes("..") ? physical(this.fs, joined2) : normalize(joined2);
1823
1824
  }
@@ -2728,7 +2729,11 @@ var init_wasi_host = __esm({
2728
2729
  o.fs.rename(from, to);
2729
2730
  fds.renamed(from, to, replaced);
2730
2731
  },
2731
- path_symlink: (tp, tl, dirfd, p, l) => void o.fs.symlink(mem.string(tp, tl), at(dirfd, p, l)),
2732
+ path_symlink: (tp, tl, dirfd, p, l) => {
2733
+ const path = at(dirfd, p, l);
2734
+ if (tl === 0) throw new WasiError("ENOENT");
2735
+ o.fs.symlink(mem.string(tp, tl), path);
2736
+ },
2732
2737
  path_readlink: (dirfd, p, l, buf, len, used) => {
2733
2738
  const target = new TextEncoder().encode(o.fs.readlink(at(dirfd, p, l)));
2734
2739
  const n = Math.min(len, target.length);