diff options
Diffstat (limited to 'apps/files_external/service/storagesservice.php')
-rw-r--r-- | apps/files_external/service/storagesservice.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php index 3e2152741e5..947e544d88f 100644 --- a/apps/files_external/service/storagesservice.php +++ b/apps/files_external/service/storagesservice.php @@ -472,10 +472,14 @@ abstract class StoragesService { if (!isset($allStorages[$id])) { throw new NotFoundException('Storage with id "' . $id . '" not found'); } - $oldStorage = $allStorages[$id]; - $allStorages[$id] = $updatedStorage; + // ensure objectstore is persistent + if ($objectstore = $oldStorage->getBackendOption('objectstore')) { + $updatedStorage->setBackendOption('objectstore', $objectstore); + } + + $allStorages[$id] = $updatedStorage; $this->writeConfig($allStorages); $this->triggerChangeHooks($oldStorage, $updatedStorage); |