Vladimir Kotikov created CB-8089:
------------------------------------

             Summary: File plugin fails to resolve local filesystem root
                 Key: CB-8089
                 URL: https://issues.apache.org/jira/browse/CB-8089
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin File
         Environment: windows
            Reporter: Vladimir Kotikov


This can be reproduced by running file spec 15

file.spec.15 should have a root that is a DirectoryEntry: error in 
resolvingLocalSystemURL.

Function try to resolve local URL like “C:\\Users\\...” but cannot find it 
because the following code searches index of incorrect root/prefix
{noformat}
if (uri.indexOf("file:///") === 0 ) {
            path = msappdataLocalPath + uri.substr(8).replace('/', '\\');
        } else if (uri.indexOf(msappdataLocalPrefix) === 0) {
            path = msappdataLocalPath + uri.replace(msappdataLocalPrefix, 
'').replace('/', '\\');
        } else if (uri.indexOf(msappdataTempPrefix) === 0) {
            path = msappdataTempPath + uri.replace(msappdataTempPrefix, 
'').replace('/', '\\');




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to