fixed retarded bug in resource loading.

This commit is contained in:
2014-07-29 03:47:39 +02:00
parent 16956fa927
commit c5fcb49e78
+10 -2
View File
@@ -341,14 +341,22 @@ public class FileUtil {
if (in != null) return in;
try {
return new FileInputStream(WorkDir.getFile(path));
return new FileInputStream(new File(".", path));
} 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;
}
}
}
public static String getResourceAsString(String path)
{