mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-17 20:31:37 +01:00
Defend against trap if renderdata/ directory doesn't exist (deleted by user)
This commit is contained in:
parent
2eb6d47d87
commit
ca62003e06
@ -293,6 +293,7 @@ public class HDBlockModels {
|
||||
}
|
||||
File customdir = new File(datadir, "renderdata");
|
||||
String[] files = customdir.list();
|
||||
if(files != null) {
|
||||
for(String fn : files) {
|
||||
if(fn.endsWith("-models.txt") == false)
|
||||
continue;
|
||||
@ -312,6 +313,7 @@ public class HDBlockModels {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Load models from file
|
||||
*/
|
||||
|
@ -788,6 +788,7 @@ public class TexturePack {
|
||||
|
||||
File renderdir = new File(datadir, "renderdata");
|
||||
String[] files = renderdir.list();
|
||||
if(files != null) {
|
||||
for(String fname : files) {
|
||||
if(fname.endsWith("-texture.txt")) {
|
||||
File custom = new File(renderdir, fname);
|
||||
@ -804,6 +805,7 @@ public class TexturePack {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load texture pack mappings from texture.txt file
|
||||
|
Loading…
Reference in New Issue
Block a user