cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-5747) Windows 8: DirectoryEntry.getDirectory fails when path contains directory separator
Date Wed, 15 Jan 2014 22:36:20 GMT

    [ https://issues.apache.org/jira/browse/CB-5747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13872714#comment-13872714
] 

ASF subversion and git services commented on CB-5747:
-----------------------------------------------------

Commit 3e4f9cdc287d907679a47a32f95238180c774860 in branch refs/heads/dev from [~matti-eerola]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-file.git;h=3e4f9cd ]

Initial fix for CB-5747


> 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)

Mime
View raw message