|
@@ -125,6 +125,17 @@
|
|
|
if (_currentDownloadType == kVLCDownloadViaHTTP) {
|
|
|
if (_httpDownloader.downloadInProgress)
|
|
|
[_httpDownloader cancelDownload];
|
|
|
+ } else if (_currentDownloadType == kVLCDownloadViaFTP) {
|
|
|
+ if (_FTPDownloadRequest) {
|
|
|
+ NSURL *target = _FTPDownloadRequest.downloadLocation;
|
|
|
+ [_FTPDownloadRequest destroy];
|
|
|
+ [self requestCompleted:_FTPDownloadRequest];
|
|
|
+
|
|
|
+ /* remove partially downloaded content */
|
|
|
+ NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
|
+ if ([fileManager fileExistsAtPath:target.path])
|
|
|
+ [fileManager removeItemAtPath:target.path error:nil];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|