CB-9969 Filetransfer upload error deletes original file

Adds corresponding test and fixes for iOS and Windows
Also fixes filetransfer.spec.9, which used an incorrect path in the root.getFile call.
This commit is contained in:
daserge
2015-11-26 22:52:54 +03:00
parent b7c500e1eb
commit c97f544ef8
3 changed files with 46 additions and 6 deletions
+3 -1
View File
@@ -631,7 +631,9 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
delegate.backgroundTaskID = UIBackgroundTaskInvalid;
}
[self removeTargetFile];
if (self.direction == CDV_TRANSFER_DOWNLOAD) {
[self removeTargetFile];
}
}
- (void)cancelTransferWithError:(NSURLConnection*)connection errorMessage:(NSString*)errorMessage