mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 05:05:16 +01:00
Fixed webpath and tilepath accepting absolute paths.
This commit is contained in:
parent
34093874bc
commit
c2047fe7c4
@ -44,14 +44,21 @@ public class MapManager extends Thread {
|
|||||||
debugger.debug(msg);
|
debugger.debug(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static File combinePaths(File parent, String path) { return combinePaths(parent, new File(path)); }
|
||||||
|
|
||||||
|
private static File combinePaths(File parent, File path) {
|
||||||
|
if (path.isAbsolute()) return path;
|
||||||
|
return new File(parent, path.getPath());
|
||||||
|
}
|
||||||
|
|
||||||
public MapManager(World world, Debugger debugger, ConfigurationNode configuration)
|
public MapManager(World world, Debugger debugger, ConfigurationNode configuration)
|
||||||
{
|
{
|
||||||
this.world = world;
|
this.world = world;
|
||||||
this.debugger = debugger;
|
this.debugger = debugger;
|
||||||
this.staleQueue = new StaleQueue();
|
this.staleQueue = new StaleQueue();
|
||||||
|
|
||||||
tileDirectory = new File(DynmapPlugin.dataRoot, configuration.getString("tilespath", "web/tiles"));
|
tileDirectory = combinePaths(DynmapPlugin.dataRoot, configuration.getString("tilespath", "web/tiles"));
|
||||||
webDirectory = new File(DynmapPlugin.dataRoot, configuration.getString("webpath", "web"));
|
webDirectory = combinePaths(DynmapPlugin.dataRoot, configuration.getString("webpath", "web"));
|
||||||
renderWait = (int)(configuration.getDouble("renderinterval", 0.5) * 1000);
|
renderWait = (int)(configuration.getDouble("renderinterval", 0.5) * 1000);
|
||||||
|
|
||||||
if (!tileDirectory.isDirectory())
|
if (!tileDirectory.isDirectory())
|
||||||
|
Loading…
Reference in New Issue
Block a user