[
https://issues.apache.org/jira/browse/CB-5747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868881#comment-13868881
]
Matti Eerola commented on CB-5747:
----------------------------------
A quick fix can be found here:
https://github.com/spMatti/cordova-plugin-file/commit/3e4f9cdc287d907679a47a32f95238180c774860
> Windows 8: DirectoryEntry.getDirectory fails when path contains directory
> separator
> -----------------------------------------------------------------------------------
>
> Key: CB-5747
> URL: https://issues.apache.org/jira/browse/CB-5747
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File, Windows 8
> Affects Versions: 3.3.0
> Environment: Windows 8.0
> Reporter: Matti Eerola
> Assignee: Jesse MacFadyen
> Priority: Minor
>
> Code:
> {code:javascript}
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 5*1024*1024*1024,
> function(fs){
> fs.root.getDirectory('foo/bar', {create:true}, function(newDir){
> });
> });
> {code}
> Problem:
> The directory separator for File Api is '/' (U+002F). So 'foo/bar' argument
> should be correct. src/windows8/FileProxy.js passes path attribute directly
> to storageFolder.createFolderAsync that uses backslash '\' (U+005c) as
> directory separator. The result is invalid path error from createFolderAsync.
> This code works, but is nonstandard:
> {code:javascript}
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 5*1024*1024*1024,
> function(fs){
> fs.root.getDirectory('foo\\bar', {create:true}, function(newDir){
> });
> });
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)