gestalt-mobile 0.66.1 → 0.66.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.
|
@@ -18,6 +18,19 @@ function reject(reason) {
|
|
|
18
18
|
/** Only the managed namespace is traversed. There are no prefix/age/PID legacy recognizers. */
|
|
19
19
|
export class FilesystemScratchCleanup {
|
|
20
20
|
async cleanSession(session, authorized, protectedSessions) {
|
|
21
|
+
// A retained session can outlive its workspace (including Self DEBUG).
|
|
22
|
+
// Only an absent workspace is already clean; existing links and invalid
|
|
23
|
+
// paths must still pass the normal canonical-path checks below.
|
|
24
|
+
if (isAbsolute(session.workspacePath)) {
|
|
25
|
+
try {
|
|
26
|
+
await lstat(session.workspacePath);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error.code === 'ENOENT')
|
|
30
|
+
return;
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
21
34
|
const counts = await this.cleanWorkspace(session.workspacePath, protectedSessions, mobileScratchOwnerId(session.id), authorized);
|
|
22
35
|
if (counts.skipped || counts.failed)
|
|
23
36
|
throw new Error('SESSION_CLEANUP_FAILED');
|