cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Howard (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-8609) File-Transfer download to subfolder on Windows causes a FileProxy exception
Date Wed, 04 Mar 2015 17:35:04 GMT

     [ https://issues.apache.org/jira/browse/CB-8609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Howard updated CB-8609:
----------------------------
    Description: 
The nativeURI passed into FileProxy.resolveLocalFileSystemURI by FileTransfer.downloadOperation
contains a Windows \ that causes the validName check to fail. As the fail function passed
is null this gives an exception. 

The FileTransfer.downloadOperation for Windows has a line of code that converts the storageFile.path
to a nativeURL and part of this is to convert Windows \ to /. Unfortunately it only replaces
the first one which is not enough when the path contains sub-folders. The fix is to use .replace(/\\/g,
'/') instead of .replace('\\', '/').

  was:




> File-Transfer download to subfolder on Windows causes a FileProxy exception
> ---------------------------------------------------------------------------
>
>                 Key: CB-8609
>                 URL: https://issues.apache.org/jira/browse/CB-8609
>             Project: Apache Cordova
>          Issue Type: Bug
>         Environment: Windows 8.1 desktop
>            Reporter: Gary Howard
>
> The nativeURI passed into FileProxy.resolveLocalFileSystemURI by FileTransfer.downloadOperation
contains a Windows \ that causes the validName check to fail. As the fail function passed
is null this gives an exception. 
> The FileTransfer.downloadOperation for Windows has a line of code that converts the storageFile.path
to a nativeURL and part of this is to convert Windows \ to /. Unfortunately it only replaces
the first one which is not enough when the path contains sub-folders. The fix is to use .replace(/\\/g,
'/') instead of .replace('\\', '/').



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

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


Mime
View raw message