[
https://issues.apache.org/jira/browse/CB-5747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matti Eerola updated CB-5747:
-----------------------------
Description:
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}
was:
Code:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 5*1024*1024*1024,
function(fs){
fs.root.getDirectory('foo/bar', {create:true}, function(newDir){
});
});
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:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 5*1024*1024*1024,
function(fs){
fs.root.getDirectory('foo\\bar', {create:true}, function(newDir){
});
});
added formatting
> 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)