fixed retarded bug in resource loading.

master
Ondřej Hruška 10 years ago
parent 16956fa927
commit c5fcb49e78
  1. 12
      src/mightypork/utils/files/FileUtil.java

@ -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)
{

Loading…
Cancel
Save