GitHub user VinceOPS opened a pull request:
https://github.com/apache/cordova-plugin-file/pull/211
CB-6938: (fix) on iOS, copyTo should overwrite any existing file
https://issues.apache.org/jira/browse/CB-6938
### Platforms affected
iOS, all versions.
### What does this PR do?
It fixes CB-6938.
Instead of returning an error 12 (PATH_EXISTS_ERR), it tries to remove the
existing file, then to copy the "new" one.
### What testing has been done on this change?
Simulator: iPhone 5 and iPhone 6 @ iOS 9, 10.
Real device: iPhone 5 @ iOS 10.
No unit test provided nor written.
### Checklist
- [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html)
in the JIRA database
- [X] Commit message follows the format: "CB-3232: (android) Fix bug with
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform
affected.
- [X] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/VinceOPS/cordova-plugin-file
CB-6938cordova-plugin-file
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-file/pull/211.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #211
----
commit 064c7f33e8d9b5dcee4f520e80a385336c9fcbc5
Author: VinceOPS <[email protected]>
Date: 2017-07-20T13:00:42Z
iOS: (fix) copyTo should overwrite any existing file
----
---
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]