Преглед на файлове

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];
     }
 }