[
https://issues.apache.org/jira/browse/CB-5901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13883822#comment-13883822
]
sandeep paliwal commented on CB-5901:
-------------------------------------
Tried the same code on HTC One Android 4.2.2
window.requestFileSystem(PERSISTENT, 0, function(fileSystem)
{
console.log("Root fs: " + fileSystem.root.fullPath);
fileSystem.root.getFile("a.txt", {create: true}, function(entry)
{
console.log(entry.fullPath);
fileSystem.root.getFile("/storage/emulated/0/a.txt", {create:
false, exclusive: false},
function(entry2)
{
console.log(entry2.toURL());
}, function() {
console.log("getFile() failed.");
console.log(JSON.stringify(arguments));
});
}, function() {
console.log("getFile(create) failed.");
console.log(JSON.stringify(arguments));
});
}, function() {
console.log("requestFileSystem failed.");
console.log(JSON.stringify(arguments));
});
output:
Root fs: file:///storage/emulated/0
file:///storage/emulated/0/a.txt
file://localhostfile:///storage/emulated/0/a.txt
------------
As you see third line output from entry2.toURL() has file://localhost extra.
> On Android FileEntry.toURL() append extra file://localhost to the file URL
> --------------------------------------------------------------------------
>
> Key: CB-5901
> URL: https://issues.apache.org/jira/browse/CB-5901
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Plugin File
> Affects Versions: 3.3.0
> Environment: Android 4.2
> Reporter: sandeep paliwal
> Assignee: Ian Clelland
> Priority: Minor
>
> The returned URL from the FileEntry object's toURL() method is now of form
> file://localhostfile:///<actual file path here>.
> This happens only on Android.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)