X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FMain.java;h=6f77e443bebdab359bbf2589f2e89cb35c925f4d;hb=aad0e5ae672189ac745a10d65e2d2d3d2b52899d;hp=0974392df9826a90b4a3dd3a6520ca52d5a1bd67;hpb=505be508ae7d3fb48122be548b310a238cfb91eb;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/Main.java b/src/be/nikiroo/fanfix/Main.java index 0974392..6f77e44 100644 --- a/src/be/nikiroo/fanfix/Main.java +++ b/src/be/nikiroo/fanfix/Main.java @@ -597,10 +597,14 @@ public class Main { } return; case STOP_SERVER: - key = Instance.getConfig().getString(Config.SERVER_KEY); - port = Instance.getConfig().getInteger(Config.SERVER_PORT); + // Can be given via "--remote XX XX XX" + if (key == null) + key = Instance.getConfig().getString(Config.SERVER_KEY); + if (port == null) + port = Instance.getConfig().getInteger(Config.SERVER_PORT); + if (port == null) { - System.err.println("No port configured in the config file"); + System.err.println("No port given nor configured in the config file"); exitCode = 15; break; } @@ -788,7 +792,7 @@ public class Main { try { URL source = BasicReader.getUrl(urlString); sourceName = source.toString(); - if (source.toString().startsWith("file://")) { + if (sourceName.startsWith("file://")) { sourceName = sourceName.substring("file://".length()); }