@poe-platform/safe-fs 0.1.55 → 0.1.57
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.
|
@@ -98,6 +98,7 @@ export declare class WebDavFileSystem implements FileSystem {
|
|
|
98
98
|
private maybeStat;
|
|
99
99
|
private withWalkDeadline;
|
|
100
100
|
stat(path: string, options?: FsOptions): Promise<FileStat>;
|
|
101
|
+
private statWithAncestors;
|
|
101
102
|
lstat(path: string, options?: FsOptions): Promise<FileStat>;
|
|
102
103
|
readdir(path: string, options?: FsOptions): Promise<DirectoryEntry[]>;
|
|
103
104
|
readFile(path: string, options?: ReadFileOptions): Promise<Uint8Array>;
|
|
@@ -700,6 +700,9 @@ export class WebDavFileSystem {
|
|
|
700
700
|
}
|
|
701
701
|
async stat(path, options = {}) {
|
|
702
702
|
validateDirectoryWalkPath(path, "stat");
|
|
703
|
+
return this.statWithAncestors(path, options);
|
|
704
|
+
}
|
|
705
|
+
async statWithAncestors(path, options) {
|
|
703
706
|
const normalized = normalize(path);
|
|
704
707
|
const collection = requiresCollection(path);
|
|
705
708
|
return this.withWalkDeadline(options, async (scopedOptions) => {
|
|
@@ -1191,7 +1194,8 @@ export class WebDavFileSystem {
|
|
|
1191
1194
|
this.unsupported("access write/execute permission checks", path);
|
|
1192
1195
|
if (mode & 1)
|
|
1193
1196
|
validateDirectoryWalkPath(path);
|
|
1194
|
-
|
|
1197
|
+
// Non-execute probes do not inherit stat's raw-path limits.
|
|
1198
|
+
const stat = await (mode & 1 ? this.stat(path, options) : this.statWithAncestors(path, options));
|
|
1195
1199
|
if (options.signal?.aborted)
|
|
1196
1200
|
fail("ECANCELED", "access", path);
|
|
1197
1201
|
if ((mode & 1) && stat.type !== "directory")
|