Skip to content

Commit 302521d

Browse files
committed
fix #7297 -- deleting aux file for side chat shouldn't autodelete main file
1 parent 928cec9 commit 302521d

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

src/packages/util/delete-files.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { path_split } from "./misc";
7-
import { hidden_meta_file, original_path } from "@cocalc/util/misc";
7+
import { hidden_meta_file } from "@cocalc/util/misc";
88

99
// NOTE: there are also .term files in subframes with history that doesn't get
1010
// deleted. That's an edge case.
@@ -16,19 +16,15 @@ export function deleted_file_variations(path: string): string[] {
1616
head = head + "/";
1717
}
1818
const variations: string[] = [path];
19-
if (tail.startsWith(".")) {
20-
variations.push(head + original_path(tail));
21-
} else {
22-
for (const ext of [
23-
"sage-chat",
24-
"sage-jupyter",
25-
"sage-jupyter2",
26-
"time-travel",
27-
"sage-history",
28-
"syncdb",
29-
]) {
30-
variations.push(head + hidden_meta_file(tail, ext));
31-
}
19+
for (const ext of [
20+
"sage-chat",
21+
"sage-jupyter",
22+
"sage-jupyter2",
23+
"time-travel",
24+
"sage-history",
25+
"syncdb",
26+
]) {
27+
variations.push(head + hidden_meta_file(tail, ext));
3228
}
3329
return variations;
3430
}

0 commit comments

Comments
 (0)