Skip to content

Commit a9ab8ab

Browse files
committed
Merge branch 'release/2.0.0-beta9'
2 parents c7a6baa + e6d11c1 commit a9ab8ab

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CryptomatorFileProvider/Middleware/TaskExecutor/ItemEnumerationTaskExecutor.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,13 @@ class ItemEnumerationTaskExecutor: WorkflowMiddleware {
145145
func cleanUpNoLongerInTheCloudExistingItems(insideParentID parentID: Int64) throws {
146146
let outdatedItems = try itemMetadataManager.getMaybeOutdatedItems(withParentID: parentID)
147147
for outdatedItem in outdatedItems {
148-
try deleteItemHelper.removeItemFromCache(outdatedItem)
149-
try itemMetadataManager.removeItemMetadata(with: outdatedItem.id!)
148+
do {
149+
try deleteItemHelper.removeItemFromCache(outdatedItem)
150+
try itemMetadataManager.removeItemMetadata(with: outdatedItem.id!)
151+
} catch CachedFileManagerError.fileHasUnsyncedEdits {
152+
// TODO: If this happens, it shouldn't be just "ignored". The outdated item is probably a folder, which contains files with unsynced edits. If that's true, they will never successfully sync and need a recovery strategy.
153+
DDLogError("Removing outdated item \(outdatedItem.id!) with type \(outdatedItem.type) failed due to having unsynced edits")
154+
}
150155
}
151156
}
152157

0 commit comments

Comments
 (0)