git://git.nikiroo.be
/
gofetch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Redit changing IDs
[gofetch.git]
/
src
/
be
/
nikiroo
/
gofetch
/
Main.java
diff --git
a/src/be/nikiroo/gofetch/Main.java
b/src/be/nikiroo/gofetch/Main.java
index 590d4a0cd1046ffedf816052921d34cfb1784465..1672c88ef5ae140317760d98798ea7f775bcc1b1 100644
(file)
--- 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 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
/**
* This class is tha main entry point of the program. It will parse the
@@
-52,7
+52,10
@@
public class Main {
System.exit(1);
}
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;
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 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);
} catch (IllegalArgumentException e) {
System.err.println("Invalid type: " + typeStr);
System.exit(1);
@@
-102,4
+105,4
@@
public class Main {
new Fetcher(dir, preselector, type, maxStories, hostname, port).start();
}
new Fetcher(dir, preselector, type, maxStories, hostname, port).start();
}
-}
\ No newline at end of file
+}