mirror of https://github.com/Xhofe/alist
fix: do not operate storage in memory if disabled
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…
Reference in New Issue