mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-27 14:04:08 -03:00
fix: address review — injective mirror roots, root relocation, full preview coverage, EXDEV-safe rollback
Codex review on #1124: - P1: mirror layout root component is now <basename>-<roothash> (sha256 of the normalized root path), so two roots sharing a basename no longer map to the same mirror directory and overwrite each other's sidecars - P1: changing sidecar_storage_path while centralized no longer strands assets in the old root — new relocate_root migration direction moves the whole mirror tree, rewrites preview_url prefixes inside sidecars, reconciles scanner caches, and prunes the emptied old tree; the settings UI detects the path change and offers the relocation - P2: migration enumerates the same preview candidates as find_preview_file — case-insensitive variants (model.WEBP) and the legacy .example.0.jpeg suffix — instead of exact lowercase PREVIEW_EXTENSIONS only - P2: _rollback_model_staging restores staged files with the EXDEV-tolerant mover, so a failed undoable-delete staging no longer strands a cross-filesystem centralized sidecar copy Tests: same-basename root injectivity, mixed-case/example preview migration, relocate_root happy path + guards + route 400, frontend relocation prompt flow. Verified end-to-end in a sandboxed standalone server: uppercase/legacy previews migrate, root relocation moves the tree and the list API serves the new locations immediately without a rescan.
This commit is contained in:
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "App-Proxy aktivieren",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "Tags zu mehreren Modellen hinzufügen",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "Enable App-level Proxy",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "Move sidecars back next to model files?",
|
||||
"confirmButton": "Migrate Now"
|
||||
"confirmButton": "Migrate Now",
|
||||
"titleRelocateRoot": "Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "Add Tags to Multiple Models",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "Habilitar proxy a nivel de aplicación",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "Añadir etiquetas a múltiples modelos",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "Activer le proxy au niveau de l'application",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "Ajouter des tags à plusieurs modèles",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "הפעל פרוקסי ברמת האפליקציה",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "הוסף תגיות למספר מודלים",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "アプリレベルのプロキシを有効化",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "複数モデルにタグを追加",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "앱 수준 프록시 활성화",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "여러 모델에 태그 추가",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "Включить прокси на уровне приложения",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "Добавить теги к нескольким моделям",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "启用应用级代理",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "批量添加标签",
|
||||
|
||||
+4
-2
@@ -809,7 +809,8 @@
|
||||
"migrateFailed": "[TODO: Translate] Sidecar migration failed: {message}",
|
||||
"migrationDeferred": "[TODO: Translate] Existing sidecars were not moved. You can migrate them later from Settings → Library → Sidecar Storage.",
|
||||
"confirmToCentralized": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them into the centralized storage directory now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button."
|
||||
"confirmToAlongside": "[TODO: Translate] The storage mode changed, but existing .metadata.json sidecars and preview images are not moved automatically. Move them back next to their model files now? You can also do this later with the \"Migrate Sidecars Now\" button.",
|
||||
"confirmRelocateRoot": "[TODO: Translate] The centralized storage directory changed, but existing sidecars and preview images are still in the previous directory. Move them to the new directory now?"
|
||||
},
|
||||
"proxySettings": {
|
||||
"enableProxy": "啟用應用程式代理",
|
||||
@@ -1662,7 +1663,8 @@
|
||||
"sidecarMigrationConfirm": {
|
||||
"titleToCentralized": "[TODO: Translate] Move sidecars to centralized storage?",
|
||||
"titleToAlongside": "[TODO: Translate] Move sidecars back next to model files?",
|
||||
"confirmButton": "[TODO: Translate] Migrate Now"
|
||||
"confirmButton": "[TODO: Translate] Migrate Now",
|
||||
"titleRelocateRoot": "[TODO: Translate] Move sidecars to the new storage directory?"
|
||||
},
|
||||
"bulkAddTags": {
|
||||
"title": "新增標籤到多個模型",
|
||||
|
||||
Reference in New Issue
Block a user