Skip to content

Commit

Permalink
fix: do not operate storage in memory if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 11, 2022
1 parent 0fdfd1f commit 0f853c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/operations/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ func UpdateStorage(ctx context.Context, storage model.Storage) error {
if err != nil {
return errors.WithMessage(err, "failed update storage in database")
}
if storage.Disabled {
return nil
}
storageDriver, err := GetStorageByVirtualPath(oldStorage.MountPath)
if oldStorage.MountPath != storage.MountPath {
// virtual path renamed, need to drop the storage
Expand Down

0 comments on commit 0f853c8

Please sign in to comment.