Github user filmaj commented on a diff in the pull request:
https://github.com/apache/cordova-plugin-file/pull/211#discussion_r128926981
--- Diff: src/ios/CDVLocalFilesystem.m ---
@@ -551,8 +551,13 @@ - (void)copyFileToURL:(CDVFilesystemURL *)destURL
withName:(NSString *)newName f
// can't copy dir into self
errCode = INVALID_MODIFICATION_ERR;
} else if (bNewExists) {
- // the full destination should NOT already exist if a
copy
- errCode = PATH_EXISTS_ERR;
+ // first try to remove the existing file
+ bSuccess = [fileMgr removeItemAtPath:newFileSystemPath
error:&error];
+
+ if (bSuccess) {
--- End diff --
What should be done in the case removal of the item fails?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]