Commit d21f989f authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

Download Controller: add cancelation support for FTP

parent 0cce1b89
......@@ -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];
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment