Эх сурвалжийг харах

Add control exists file view Document and Audio

Marino Faggiana 7 жил өмнө
parent
commit
f92ddbb6d0

+ 12 - 0
iOSClient/Main/CCDetail.m

@@ -292,6 +292,12 @@
         [[NSFileManager defaultManager] linkItemAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, self.metadataDetail.fileID] toPath:fileName error:nil];
     }
     
+    if ([[NSFileManager defaultManager] fileExistsAtPath:fileName] == NO) {
+        
+        [self backNavigationController];
+        return;
+    }
+    
     appDelegate.player.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - TOOLBAR_HEIGHT);
     appDelegate.player.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
 
@@ -336,6 +342,12 @@
         [[NSFileManager defaultManager] linkItemAtPath:[NSString stringWithFormat:@"%@/%@", app.directoryUser, self.metadataDetail.fileID] toPath:fileName error:nil];
     }
     
+    if ([[NSFileManager defaultManager] fileExistsAtPath:fileName] == NO) {
+        
+        [self backNavigationController];
+        return;
+    }
+    
     NSURL *url = [NSURL fileURLWithPath:fileName];
 
     WKPreferences *wkPreferences = [[WKPreferences alloc] init];