From 2da04201d8ef4d8bbaee3afdd2ea531e3c4db36a Mon Sep 17 00:00:00 2001 From: Vg Srivathsan Date: Sun, 14 Jun 2026 09:19:03 +0530 Subject: [PATCH 1/4] curd storage fix --- bucket/curd.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/bucket/curd.json b/bucket/curd.json index ddbcbc2360522e..1bddc16f017bd4 100644 --- a/bucket/curd.json +++ b/bucket/curd.json @@ -11,6 +11,49 @@ } }, "bin": "curd.exe", + "post_install": [ + "# --- Config dir: %APPDATA%\\Curd -> junction to $persist_dir\\config ---", + "$appdata_config = \"$env:APPDATA\\Curd\"", + "if (!(Test-Path \"$persist_dir\\config\")) {", + " if (Test-Path $appdata_config) {", + " Move-Item $appdata_config \"$persist_dir\\config\"", + " } else {", + " New-Item -ItemType Directory -Force \"$persist_dir\\config\" | Out-Null", + " }", + "}", + "if ((Get-Item $appdata_config -ErrorAction SilentlyContinue).LinkType -ne 'Junction') {", + " if (Test-Path $appdata_config) { Remove-Item $appdata_config -Recurse -Force }", + " New-Item -ItemType Junction -Path $appdata_config -Target \"$persist_dir\\config\" | Out-Null", + "}", + "", + "# --- Patch StoragePath in config to point to $persist_dir\\storage ---", + "$cfg = \"$persist_dir\\config\\curd.conf\"", + "if (Test-Path $cfg) {", + " $content = Get-Content $cfg", + " if ($content -match '^StoragePath\\s*=') {", + " $content = $content -replace '^StoragePath\\s*=.*', \"StoragePath=$persist_dir\\storage\"", + " Set-Content $cfg $content", + " } else {", + " Add-Content $cfg \"`nStoragePath=$persist_dir\\storage\"", + " }", + "} else {", + " New-Item -ItemType File -Force $cfg | Out-Null", + " Set-Content $cfg \"StoragePath=$persist_dir\\storage\"", + "}", + "", + "# --- Migrate old storage from C:\\.local\\share\\curd if present ---", + "$old_storage = \"C:\\.local\\share\\curd\"", + "if ((Test-Path $old_storage) -and !(Test-Path \"$persist_dir\\storage\")) {", + " Move-Item $old_storage \"$persist_dir\\storage\"", + "}" + ], + "pre_uninstall": [ + "# Remove the AppData junction but leave persist data intact", + "$appdata_config = \"$env:APPDATA\\Curd\"", + "if ((Get-Item $appdata_config -ErrorAction SilentlyContinue).LinkType -eq 'Junction') {", + " Remove-Item $appdata_config -Force", + "}" + ], "checkver": "github", "autoupdate": { "architecture": { From fbf573e3391ff617fa40cfcb9347f48797793e82 Mon Sep 17 00:00:00 2001 From: Vg Srivathsan Date: Sun, 14 Jun 2026 09:32:31 +0530 Subject: [PATCH 2/4] curd fix update --- bucket/curd.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bucket/curd.json b/bucket/curd.json index 1bddc16f017bd4..ed1110f17186eb 100644 --- a/bucket/curd.json +++ b/bucket/curd.json @@ -45,7 +45,10 @@ "$old_storage = \"C:\\.local\\share\\curd\"", "if ((Test-Path $old_storage) -and !(Test-Path \"$persist_dir\\storage\")) {", " Move-Item $old_storage \"$persist_dir\\storage\"", - "}" + "}", + "", + "# --- Ensure storage dir exists regardless of migration ---", + "New-Item -ItemType Directory -Force \"$persist_dir\\storage\" | Out-Null" ], "pre_uninstall": [ "# Remove the AppData junction but leave persist data intact", @@ -62,4 +65,4 @@ } } } -} +} \ No newline at end of file From 5babba1c894a79ab85ba21dd2e29a20536a5f628 Mon Sep 17 00:00:00 2001 From: Vg Srivathsan Date: Sun, 14 Jun 2026 09:36:00 +0530 Subject: [PATCH 3/4] lint fix --- bucket/curd.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucket/curd.json b/bucket/curd.json index ed1110f17186eb..9f09835093a310 100644 --- a/bucket/curd.json +++ b/bucket/curd.json @@ -65,4 +65,4 @@ } } } -} \ No newline at end of file +} From 7e6e3aa219e0d20e260e686383c6ac9f58dabf62 Mon Sep 17 00:00:00 2001 From: Vg Srivathsan Date: Sun, 14 Jun 2026 09:44:37 +0530 Subject: [PATCH 4/4] fix for fresh install --- bucket/curd.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bucket/curd.json b/bucket/curd.json index 9f09835093a310..7b5cf8aa3d5191 100644 --- a/bucket/curd.json +++ b/bucket/curd.json @@ -12,6 +12,9 @@ }, "bin": "curd.exe", "post_install": [ + "# --- Ensure persist_dir exists (not guaranteed without a persist array) ---", + "New-Item -ItemType Directory -Force \"$persist_dir\" | Out-Null", + "", "# --- Config dir: %APPDATA%\\Curd -> junction to $persist_dir\\config ---", "$appdata_config = \"$env:APPDATA\\Curd\"", "if (!(Test-Path \"$persist_dir\\config\")) {",