瀏覽代碼

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