mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out a8a93012f474 (bug 723295) for too much orange and red
This commit is contained in:
parent
835d44b3aa
commit
d74a440771
@ -137,7 +137,7 @@ abstract public class GeckoDirProvider
|
||||
File mozDir = new File(filesDir, "mozilla");
|
||||
if (!mozDir.exists()) {
|
||||
if (!mozDir.mkdir())
|
||||
throw new IOException("Unable to create mozilla directory at " + mozDir.getAbsolutePath());
|
||||
throw new IOException("Unable to create mozilla directory at " + mozDir.getPath());
|
||||
}
|
||||
return mozDir;
|
||||
}
|
||||
@ -205,14 +205,11 @@ abstract public class GeckoDirProvider
|
||||
if (aContext == null)
|
||||
throw new IllegalArgumentException("Must provide a valid context");
|
||||
|
||||
if (Build.VERSION.SDK_INT < 8)
|
||||
if (Build.VERSION.SDK_INT < 8 ||
|
||||
aContext.getPackageResourcePath().startsWith("/data") ||
|
||||
aContext.getPackageResourcePath().startsWith("/system")) {
|
||||
return aContext.getFilesDir();
|
||||
|
||||
String resourcePath = aContext.getPackageResourcePath();
|
||||
File externalDir = aContext.getExternalFilesDir(null);
|
||||
if (resourcePath.startsWith("/data") || resourcePath.startsWith("/system") || externalDir == null)
|
||||
return aContext.getFilesDir();
|
||||
|
||||
return externalDir;
|
||||
}
|
||||
return aContext.getExternalFilesDir(null);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user