fixed retarded bug in resource loading.
This commit is contained in:
@@ -341,14 +341,22 @@ public class FileUtil {
|
|||||||
if (in != null) return in;
|
if (in != null) return in;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return new FileInputStream(WorkDir.getFile(path));
|
return new FileInputStream(new File(".", path));
|
||||||
|
|
||||||
} catch (final FileNotFoundException e) {
|
} catch (final FileNotFoundException e) {
|
||||||
Log.w("Could not open resource stream: " + path);
|
|
||||||
|
try {
|
||||||
|
return new FileInputStream(WorkDir.getFile(path));
|
||||||
|
|
||||||
|
} catch (final FileNotFoundException e2) {
|
||||||
|
Log.w("Could not open resource stream, file not found: " + path);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String getResourceAsString(String path)
|
public static String getResourceAsString(String path)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user