Explorar el Código

VLCDownloadViewController: Do not use fileExistsAtPath to check whether the operation will succeed

Signed-off-by: Carola Nitz <nitz.carola@googlemail.com>
Soomin Lee hace 7 años
padre
commit
9a8dd10e3c
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      Sources/VLCDownloadViewController.m

+ 1 - 3
Sources/VLCDownloadViewController.m

@@ -240,9 +240,7 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) {
         [self requestCompleted:_FTPDownloadRequest];
 
         /* remove partially downloaded content */
-        NSFileManager *fileManager = [NSFileManager defaultManager];
-        if ([fileManager fileExistsAtPath:target.path])
-            [fileManager removeItemAtPath:target.path error:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:target.path error:nil];
     }
 }