1-
21import java .io .File ;
32import java .io .IOException ;
43import java .util .Scanner ;
@@ -33,25 +32,36 @@ public static void main(String[] args) throws IOException {
3332 String answer = s .next ();
3433 String path = null ;
3534
36- if ("y" .equals (answer )){
35+ if ("y" .equals (answer )){
3736
3837 System .out .println ("Bitte geben sie den Speicherpfad des Addon Ordners an" );
3938 path = s .next ();
4039
4140 } else if ("n" .equals (answer )){
4241
43- if (!"Windows" .contains (System .getProperty ("os.name" ))){
42+ if (!"Windows ([0-7]) " .contains (System .getProperty ("os.name" ))){
4443
4544 System .out .println ("Mometan gib es keinen Standardpfad für " + System .getProperty ("os.name" )+" bitte gebe den Pfad manuell ein" );
4645 System .exit (0 );
4746
4847 }
48+
49+ /* if ("Linux".contains(System.getProperty("os.name"))){
50+
51+ System.out.println("Mometan gib es keinen Standardpfad für " + System.getProperty("os.name")+" bitte gebe den Pfad manuell ein");
52+ System.exit(0);
53+
54+ }*/
4955 path = "C:\\ Program Files (x86)\\ Steam\\ steamapps\\ common\\ GarrysMod\\ garrysmod\\ addons" ;
50- System .out .println ("Der Speicherpfad von Garrys Mod wurde nicht verändert" +path );
56+ System .out .println ("Der Speicherpfad von Garrys Mod wurde nicht verändert" );
57+ System .out .println (path );
5158
5259
5360 }
54-
61+ if (!"y" .equals (answer ) || "n" .equals (answer )){
62+ System .exit (0 );
63+ }
64+
5565 // Suche tmp Ordner
5666
5767 File temp = File .createTempFile ("temp-file-name" , ".tmp" );
@@ -67,7 +77,7 @@ public static void main(String[] args) throws IOException {
6777 String saveDir = tempFilePath ;
6878
6979 System .out .println ("Downloadvorbereitungen wurden abgeschlossen möchtest du starten ?" );
70- System .out .println ("Beliebiges Zeichen eingeben um fortzufahren" );
80+ System .out .println ("Beliebige eingabe um fortzufahren" );
7181 s .next ();
7282
7383 try {
0 commit comments