cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From filmaj <...@git.apache.org>
Subject [GitHub] cordova-plugin-file pull request #211: CB-6938: (fix) on iOS, copyTo should ...
Date Sun, 23 Jul 2017 19:09:14 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message