forked from github/cordova-android
Need to add/trim file:// where applicable
This commit is contained in:
parent
657faaff7f
commit
b4d1ca6181
@ -687,6 +687,9 @@ public class FileUtils extends Plugin {
|
|||||||
if (fileName.startsWith("/")) {
|
if (fileName.startsWith("/")) {
|
||||||
fp = new File(fileName);
|
fp = new File(fileName);
|
||||||
} else {
|
} else {
|
||||||
|
if (dirPath.startsWith("file://")) {
|
||||||
|
dirPath = dirPath.substring(7);
|
||||||
|
}
|
||||||
fp = new File(dirPath + File.separator + fileName);
|
fp = new File(dirPath + File.separator + fileName);
|
||||||
}
|
}
|
||||||
return fp;
|
return fp;
|
||||||
@ -819,7 +822,7 @@ public class FileUtils extends Plugin {
|
|||||||
entry.put("isFile", file.isFile());
|
entry.put("isFile", file.isFile());
|
||||||
entry.put("isDirectory", file.isDirectory());
|
entry.put("isDirectory", file.isDirectory());
|
||||||
entry.put("name", file.getName());
|
entry.put("name", file.getName());
|
||||||
entry.put("fullPath", file.getAbsolutePath());
|
entry.put("fullPath", "file://" + file.getAbsolutePath());
|
||||||
// I can't add the next thing it as it would be an infinite loop
|
// I can't add the next thing it as it would be an infinite loop
|
||||||
//entry.put("filesystem", null);
|
//entry.put("filesystem", null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user