marinofaggiana 5 years ago
parent
commit
e326ee0d53
1 changed files with 3 additions and 2 deletions
  1. 3 2
      iOSClient/Main/NCDetailViewController.swift

+ 3 - 2
iOSClient/Main/NCDetailViewController.swift

@@ -136,8 +136,9 @@ class NCDetailViewController: UIViewController {
     
     @objc func moveFile(_ notification: NSNotification) {
         if let userInfo = notification.userInfo as NSDictionary? {
-            if let metadata = userInfo["metadata"] as? tableMetadata, let metadataNew = userInfo["metadataNew"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int {
-                if errorCode != 0 { return }
+            if let metadata = userInfo["metadata"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int {
+                if errorCode != 0 || metadata.serverUrl != self.metadata?.serverUrl { return }
+                self.deleteFile(notification)
             }
         }
     }