Commit 89aec2b6 authored by leMaik's avatar leMaik
Browse files

Fix url being wrong.

parent bc001290
......@@ -20,6 +20,19 @@ public class HttpRemoteDynmapServer extends AbstractDynmapServer {
@Override
public AbstractFile getFile(String path) throws IOException {
return new HttpRemoteFile((url + "/" + path).replace(File.separator, "/").replace("//", "/"));
path = path.replace(File.separator, "/");
if (url.endsWith("/")) {
if (path.startsWith("/")) {
return new HttpRemoteFile(url + path.substring(1));
} else {
return new HttpRemoteFile(url + path.substring(1));
}
} else {
if (path.startsWith("/")) {
return new HttpRemoteFile(url + path);
} else {
return new HttpRemoteFile(url + "/" + path);
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment