Fix file rename

This commit is contained in:
Christoph Hagen 2025-01-07 14:03:21 +01:00
parent 508483071a
commit c5a00ef0f8

View File

@ -286,11 +286,14 @@ final class Storage: ObservableObject {
}
/**
Move (rename) a file resource.
Move (rename) a file resource (moves file content and file info)
*/
func move(file fileId: String, to newId: String) -> Bool {
guard let contentScope else { return false }
return contentScope.move(filePath(file: fileId), to: filePath(file: newId))
guard contentScope.move(filePath(file: fileId), to: filePath(file: newId)) else {
return false
}
return contentScope.move(fileInfoPath(file: fileId), to: fileInfoPath(file: newId))
}
/**