Return string for root location in requestFileSystem

This commit is contained in:
Fil Maj 2012-02-15 17:30:32 -08:00 committed by Joe Bowser
parent 5253b5fb31
commit a43e80ae1d

View File

@ -782,14 +782,14 @@ public class FileUtils extends Plugin {
File fp;
fs.put("name", "temporary");
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
fs.put("root", getEntry(Environment.getExternalStorageDirectory().getAbsolutePath() +
"/Android/data/" + ctx.getPackageName() + "/cache/"));
fs.put("root", Environment.getExternalStorageDirectory().getAbsolutePath() +
"/Android/data/" + ctx.getPackageName() + "/cache/");
// Create the cache dir if it doesn't exist.
fp = new File(Environment.getExternalStorageDirectory().getAbsolutePath() +
"/Android/data/" + ctx.getPackageName() + "/cache/");
} else {
fs.put("root", getEntry("/data/data/" + ctx.getPackageName() + "/cache/"));
fs.put("root", "/data/data/" + ctx.getPackageName() + "/cache/");
// Create the cache dir if it doesn't exist.
fp = new File("/data/data/" + ctx.getPackageName() + "/cache/");
}
@ -798,9 +798,9 @@ public class FileUtils extends Plugin {
else if (type == PERSISTENT) {
fs.put("name", "persistent");
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
fs.put("root", getEntry(Environment.getExternalStorageDirectory()));
fs.put("root", Environment.getExternalStorageDirectory());
} else {
fs.put("root", getEntry("/data/data/" + ctx.getPackageName()));
fs.put("root", "/data/data/" + ctx.getPackageName());
}
}
else {