Improve storage

This commit is contained in:
Christoph Hagen
2024-12-19 16:25:05 +01:00
parent 9c828ff80a
commit 41887a1401
30 changed files with 926 additions and 831 deletions

View File

@ -92,10 +92,8 @@ struct AddFileView: View {
continue
}
if let url = file.url {
do {
try content.storage.copyFile(at: url, fileId: file.uniqueId)
} catch {
print("Failed to import file '\(file.uniqueId)' at \(url.path()): \(error)")
guard content.storage.importExternalFile(at: url, fileId: file.uniqueId) else {
print("Failed to import file '\(file.uniqueId)' at \(url.path())")
return
}
}