Github user daserge commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-file-transfer/pull/115#discussion_r46001338
  
    --- Diff: tests/tests.js ---
    @@ -450,7 +450,7 @@ exports.defineAutoTests = function () {
                             expect(transfer.onprogress).toHaveBeenCalled();
     
                             // check that there is no file
    -                        root.getFile(localFilePath, null, 
unexpectedCallbacks.fileSystemWin, done);
    +                        root.getFile(fileName, null, 
unexpectedCallbacks.fileSystemWin, done);
    --- End diff --
    
    Despite the fact that [the 
docs](https://github.com/apache/cordova-plugin-file/blob/ab42f3e7c6c2282ac303e32260e8d68fdd2e18e3/www/DirectoryEntry.js#L98)
 says it takes a relative or an absolute path (by the way I can't find any File 
plugin test for an absolute path), the use of `localFilePath` (which is 
`file:///` on Android and `ms-appdata:///` on Windows) causes a fail with 
`FileError.ENCODING_ERR = 5` instead of `FileError.NOT_FOUND_ERR = 1`.
    Probably the absolute path should be absolute to the fs root like 
`/dir/file.txt` and not a native path.


---
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]

Reply via email to