Skip to content

Commit 8b01f3e

Browse files
HonaShamirSecret
authored andcommitted
fix(opencode): enforce storage path invariants (anomalyco#29666)
(cherry picked from commit f0c7feb)
1 parent a772eb1 commit 8b01f3e

15 files changed

Lines changed: 1993 additions & 17 deletions

File tree

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
packages/core/migration/**/snapshot.json linguist-generated
2+
packages/core/src/database/migration.gen.ts linguist-generated
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
UPDATE project SET worktree = REPLACE(worktree, char(92), '/') WHERE worktree GLOB '[A-Za-z]:' || char(92) || '*' OR worktree LIKE char(92) || char(92) || '%';
2+
--> statement-breakpoint
3+
UPDATE project SET sandboxes = REPLACE(sandboxes, char(92) || char(92), '/') WHERE instr(sandboxes, char(92)) > 0 AND (worktree GLOB '[A-Za-z]:*' OR worktree LIKE '//%');
4+
--> statement-breakpoint
5+
UPDATE session SET directory = REPLACE(directory, char(92), '/') WHERE directory GLOB '[A-Za-z]:' || char(92) || '*' OR directory LIKE char(92) || char(92) || '%';
6+
--> statement-breakpoint
7+
UPDATE session SET path = REPLACE(path, char(92), '/') WHERE path IS NOT NULL AND instr(path, char(92)) > 0 AND (directory GLOB '[A-Za-z]:*' OR directory LIKE '//%');

0 commit comments

Comments
 (0)