Marino Faggiana 7 năm trước cách đây
mục cha
commit
570f4c58cd
1 tập tin đã thay đổi với 8 bổ sung1 xóa
  1. 8 1
      iOSClient/Database/NCManageDatabase.swift

+ 8 - 1
iOSClient/Database/NCManageDatabase.swift

@@ -2186,7 +2186,14 @@ class NCManageDatabase: NSObject {
             } else {
                 addLocalFile.date = NSDate()
             }
-            addLocalFile.etag = table.rev!
+            
+            if (table.rev != nil) {
+                addLocalFile.etag = table.rev!
+            } else {
+                realm.cancelWrite()
+                return
+            }
+            
             if table.exifDate != nil {
                 addLocalFile.exifDate = table.exifDate! as NSDate
             }