Переглянути джерело

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

Signed-off-by: Carola Nitz <nitz.carola@googlemail.com>
Soomin Lee 7 роки тому
батько
коміт
9a8dd10e3c
1 змінених файлів з 1 додано та 3 видалено
  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];
     }
 }