@foldrun/core 7.0.1 → 7.0.2
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.
- package/dist/src/store.js +4 -7
- package/package.json +1 -1
- package/src/store.ts +4 -6
package/dist/src/store.js
CHANGED
|
@@ -2351,13 +2351,10 @@ function realLanding(full, followLast = true) {
|
|
|
2351
2351
|
* /etc/passwd, or a folder → / — passed them, and reads, writes and the run
|
|
2352
2352
|
* archive followed it out. */
|
|
2353
2353
|
function landsInside(dir, full, followLast = true) {
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
catch {
|
|
2359
|
-
root = path.resolve(dir);
|
|
2360
|
-
}
|
|
2354
|
+
// Canonical the same way as the path: a workspace not made yet under a
|
|
2355
|
+
// linked ancestor (macOS /tmp → /private/tmp) is its nearest real
|
|
2356
|
+
// ancestor plus the rest, or a first write into it would read as leaving.
|
|
2357
|
+
const root = realLanding(dir) ?? path.resolve(dir);
|
|
2361
2358
|
const at = realLanding(full, followLast);
|
|
2362
2359
|
return at !== null && (at === root || at.startsWith(root + path.sep));
|
|
2363
2360
|
}
|
package/package.json
CHANGED
package/src/store.ts
CHANGED
|
@@ -2818,12 +2818,10 @@ function realLanding(full: string, followLast = true): string | null {
|
|
|
2818
2818
|
* /etc/passwd, or a folder → / — passed them, and reads, writes and the run
|
|
2819
2819
|
* archive followed it out. */
|
|
2820
2820
|
function landsInside(dir: string, full: string, followLast = true): boolean {
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
root = path.resolve(dir);
|
|
2826
|
-
}
|
|
2821
|
+
// Canonical the same way as the path: a workspace not made yet under a
|
|
2822
|
+
// linked ancestor (macOS /tmp → /private/tmp) is its nearest real
|
|
2823
|
+
// ancestor plus the rest, or a first write into it would read as leaving.
|
|
2824
|
+
const root = realLanding(dir) ?? path.resolve(dir);
|
|
2827
2825
|
const at = realLanding(full, followLast);
|
|
2828
2826
|
return at !== null && (at === root || at.startsWith(root + path.sep));
|
|
2829
2827
|
}
|