Skip to content

Commit 0b4c2b0

Browse files
RizlimDevRizlimDev
authored andcommitted
v1.7
1 parent 2b6bff9 commit 0b4c2b0

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>RizlimDev</groupId>
88
<artifactId>PoE-Addon-Manager-Launcher</artifactId>
9-
<version>1.6</version>
9+
<version>1.7</version>
1010

1111
<dependencies>
1212
<dependency>

src/main/java/GUI/LauncherUI_Controller.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,15 +273,24 @@ private void daemon_checker()
273273

274274
File f = new File(Data2.getINSTANCE().getCoreFolder());
275275

276-
for (File f_ : f.listFiles())
276+
if (!f.exists())
277277
{
278-
if (f_.getName().equals(current_most_recent))
278+
f.mkdir();
279+
}
280+
281+
if (f.listFiles() != null)
282+
{
283+
for (File f_ : f.listFiles())
279284
{
280-
Data.setStatus("You have " + current_most_recent + " which is the most recent build!");
281-
runSpecificVersion(f_);
282-
return;
285+
if (f_.getName().equals(current_most_recent))
286+
{
287+
Data.setStatus("You have " + current_most_recent + " which is the most recent build!");
288+
runSpecificVersion(f_);
289+
return;
290+
}
283291
}
284292
}
293+
285294
Data.setStatus("You are out of date! Downloading new version...");
286295
String jar = UpdateCheckerClient.getINSTANCE().downloadUpdate(repository.getLatestRelease().getAssets().get(0).getBrowserDownloadUrl());
287296
runSpecificVersion(new File(jar));

src/main/java/Launcher.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
import GUI.Data2;
44
import GUI.LauncherUI;
55

6+
import java.net.URISyntaxException;
7+
68
/**
79
* Launches the UI.
810
*/
911
public class Launcher
1012
{
11-
public static void main(String[] args)
13+
public static void main(String[] args) throws URISyntaxException
1214
{
1315
boolean succesful_read = Data2.getINSTANCE().readLauncherData();
1416

1517
if (succesful_read)
1618
{
19+
Data2.getINSTANCE().getData().setLauncher_location(Configurator.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
1720
LauncherUI launcherUI = new LauncherUI();
1821
launcherUI.ui_launch(args);
1922
}

0 commit comments

Comments
 (0)