mirror of
https://github.com/shagr4th/droid48
synced 2025-01-29 20:34:23 +01:00
Fix on data directory retrieval
This commit is contained in:
parent
b7f740a957
commit
1ac3fa5334
1 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ public class AssetUtil {
|
|||
required = 262144;
|
||||
//boolean SKUNK = assets[i].equals("SKUNK");
|
||||
if (hp48 || rom || ram || hp48s || roms || rams) {
|
||||
File rep = sd?new File(Environment.getExternalStorageDirectory(), ".hp48"):Environment.getDataDirectory();
|
||||
File rep = sd?new File(Environment.getExternalStorageDirectory(), ".hp48"):new File(Environment.getDataDirectory(), "data/org.ab.x48");
|
||||
File fout = new File(rep, assets[i]);
|
||||
if (!fout.exists() || fout.length() == 0 || (required > 0 && fout.length() != required) || force) {
|
||||
Log.i("x48", "Overwriting " + assets[i]);
|
||||
|
@ -73,7 +73,7 @@ public class AssetUtil {
|
|||
public static boolean isFilesReady() {
|
||||
File hpDir = new File(Environment.getExternalStorageDirectory(), ".hp48");
|
||||
if (!hpDir.exists() || !hpDir.isDirectory()) {
|
||||
hpDir = Environment.getDataDirectory();
|
||||
hpDir = new File(Environment.getDataDirectory(), "data/org.ab.x48");
|
||||
if (!hpDir.exists() || !hpDir.isDirectory())
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue