File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
src/main/java/com/itzilly/shadowOverlay Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 77
88public class Constants {
99
10- public static String BUILD_NUMBER = "b20 " ;
11- public static String VERSION = "A0.3.0 " ;
10+ public static String BUILD_NUMBER = "b21 " ;
11+ public static String VERSION = "A0.3.1 " ;
1212 public static String VERSION_SHORTHAND = VERSION + "-" + BUILD_NUMBER ;
1313 public static String WINDOW_TITLE = "Shadow Overlay " + VERSION_SHORTHAND ;
1414
Original file line number Diff line number Diff line change 33import com .itzilly .shadowOverlay .ui .MainWindow ;
44import org .ini4j .Ini ;
55
6- import java .io .File ;
7- import java .io .FileOutputStream ;
8- import java .io .IOException ;
9- import java .io .PrintStream ;
6+ import java .io .*;
107
118public class ShadowOverlay {
129 public static void main (String [] args ) {
10+ boolean couldSetStream = false ;
1311 try {
1412 System .setOut (new PrintStream (new FileOutputStream (Constants .APPDATA_PATH () + File .separator + "latest.out" )));
1513 System .setErr (new PrintStream (new FileOutputStream (Constants .APPDATA_PATH () + File .separator + "latest.err" )));
14+ couldSetStream = true ;
1615 } catch (IOException e ) {
17- if (e .getMessage ().endsWith ("(The system cannot find the path specified)" )) {
18- boolean firstTime = true ;
19- }
2016 e .printStackTrace ();
2117 }
2218
2319 boolean createdUserDirs = createdUserDirs ();
2420
2521 genConfig ();
2622
23+ if (!couldSetStream ) {
24+ try {
25+ System .setOut (new PrintStream (new FileOutputStream (Constants .APPDATA_PATH () + File .separator + "latest.out" )));
26+ System .setErr (new PrintStream (new FileOutputStream (Constants .APPDATA_PATH () + File .separator + "latest.err" )));
27+ } catch (FileNotFoundException e ) {
28+ System .exit (1 );
29+ }
30+
31+ }
32+
2733 // Show main window
2834 MainWindow .showOverlay ();
2935 }
You can’t perform that action at this time.
0 commit comments