chore: fix typo

This commit is contained in:
Noah Hsu
2022-08-31 22:08:12 +08:00
parent b73dce33aa
commit d31faabc24
3 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@ var storagesMap generic_sync.MapOf[string, driver.Driver]
func GetStorageByVirtualPath(virtualPath string) (driver.Driver, error) {
storageDriver, ok := storagesMap.Load(virtualPath)
if !ok {
return nil, errors.Errorf("no virtual path for an storage is: %s", virtualPath)
return nil, errors.Errorf("no mount path for an storage is: %s", virtualPath)
}
return storageDriver, nil
}
@ -154,7 +154,7 @@ func UpdateStorage(ctx context.Context, storage model.Storage) error {
}
storageDriver, err := GetStorageByVirtualPath(oldStorage.MountPath)
if oldStorage.MountPath != storage.MountPath {
// virtual path renamed, need to drop the storage
// mount path renamed, need to drop the storage
storagesMap.Delete(oldStorage.MountPath)
}
if err != nil {