package fr.mantal.wcdl;

import java.nio.file.Files;
import java.nio.file.Paths;

public class Main
{
	public static void main(String[] args)
	{
		Downloader.fromConfig(getPath(args[0])).download();
	}

	private static String getPath(String arg0)
	{
		if (arg0.isEmpty())
			arg0 = System.getProperty("user.dir");

		if (Files.isDirectory(Paths.get(arg0)))
			return Paths.get(arg0, ".config.wcdl").toString();
		return arg0;
	}
}

@@ -178,11 +178,8 @@
 args
-%5B0%5D
 )).d
@@ -234,49 +234,63 @@
 ring
+%5B%5D
  arg
-0
+s
 )%0A%09%7B%0A%09%09
-if (arg0.isEmpty())%0A%09%09%09arg0 =
+String arg0 = args.length %3E 1 ? args%5B0%5D :
  Sys

Fix crash when launched without arguments