cordova-plugin-file
cordova-plugin-file copied to clipboard
Windows: DirectoryReader returns entries with invalid nativeURL
I am not sure why this appeared now in my latest build of application. There seem to be no changes either in my application nor in file plugin since previous time it worked.
When calling readEntries on DirectoryReader created on rool filsystem with url starting with "file:///C%3A/" the entries return have nativeURL starting with "file:///C%253A/". When this nativeURL is given to resolveLocalFileSystemURL, it fails with error "File not found". Specifically, calls to native windows api getFileFromPathAsync and getFolderFromPathAsync fail, theay are called with path starting with "\C%3A".
I will create a pool request that changes the code to create nativeURL starting with "file:///C%3A/", which fixes the error. But since the affected code was not change for a long time, the proposed change might not address the root cause of problem. Please review
thanks