fix(storage): resolve ${VAR:-default} bind sources and safe conversion (#12227)

This commit is contained in:
Andras Bacsai
2026-10-20 11:41:54 +02:00
committed by GitHub
parent 5925c8403a
commit 2ade696375
5 changed files with 164 additions and 66 deletions
+6 -2
View File
@@ -167,10 +167,12 @@ class FileStorage extends Component
$this->fileStorage->content = null;
$this->fileStorage->is_based_on_git = false;
$changedFields = auditChangedFields($this->fileStorage);
$this->fileStorage->save();
$this->fileStorage->saveStorageOnServer();
$this->fileStorage->save();
$this->auditFileStorageUpdate($changedFields, 'converted_to_directory');
} catch (\Throwable $e) {
$this->fileStorage->refresh();
return handleError($e, $this);
} finally {
$this->dispatch('storageCountsChanged')->to(Storage::class);
@@ -216,10 +218,12 @@ class FileStorage extends Component
$this->fileStorage->is_based_on_git = true;
}
$changedFields = auditChangedFields($this->fileStorage);
$this->fileStorage->save();
$this->fileStorage->saveStorageOnServer();
$this->fileStorage->save();
$this->auditFileStorageUpdate($changedFields, 'converted_to_file');
} catch (\Throwable $e) {
$this->fileStorage->refresh();
return handleError($e, $this);
} finally {
$this->dispatch('storageCountsChanged')->to(Storage::class);