X-Git-Url: https://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fgofetch%2FMain.java;h=e4078d8d1009e454dfcea46ea3907ce45212a7ca;hb=1ab7ff0acbc00ddcf6b27a3bebd1e351fdbe96a2;hp=590d4a0cd1046ffedf816052921d34cfb1784465;hpb=737852686d8897331706ed4b902dbd9d5038cb53;p=gofetch.git diff --git a/src/be/nikiroo/gofetch/Main.java b/src/be/nikiroo/gofetch/Main.java index 590d4a0..e4078d8 100644 --- a/src/be/nikiroo/gofetch/Main.java +++ b/src/be/nikiroo/gofetch/Main.java @@ -3,7 +3,7 @@ package be.nikiroo.gofetch; import java.io.File; import java.io.IOException; -import be.nikiroo.gofetch.support.BasicSupport.Type; +import be.nikiroo.gofetch.support.Type; /** * This class is tha main entry point of the program. It will parse the @@ -52,7 +52,10 @@ public class Main { System.exit(1); } - // Selector base (empty is ok, DO NOT end with /) + // Selector base : + // - empty is ok + // - DO NOT end with / + // - always starts with / if not empty String preselector = ""; if (preselectorStr != null && !preselectorStr.startsWith("/")) { preselector = "/" + preselectorStr; @@ -65,7 +68,7 @@ public class Main { Type type = null; if (!"ALL".equals(typeStr)) { try { - Type.valueOf(typeStr.toUpperCase()); + type = Type.valueOf(typeStr.toUpperCase()); } catch (IllegalArgumentException e) { System.err.println("Invalid type: " + typeStr); System.exit(1);