mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-25 14:54:03 +08:00
fix: do not operate storage in memory if disabled
This commit is contained in:
parent
0fdfd1f2c2
commit
0f853c86da
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user