You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Matti Eerola (JIRA)" <ji...@apache.org> on 2014/01/08 21:26:50 UTC
[jira] [Created] (CB-5747) Windows 8: DirectoryEntry.getDirectory
fails when path contains directory separator
Matti Eerola created CB-5747:
--------------------------------
Summary: 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:
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){
});
});
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)