Fix symlink recreation
This commit is contained in:
parent
06c15c597d
commit
3defbbe725
@ -174,9 +174,7 @@ public class KCauldronUpdater implements Runnable {
|
||||
mSender.sendMessage(ChatColor.RED + "Create symlink "
|
||||
+ ChatColor.GOLD + symlinkPath.getAbsolutePath());
|
||||
}
|
||||
if (symlinkPath.exists()) {
|
||||
symlinkPath.delete();
|
||||
}
|
||||
Files.deleteIfExists(symlinkPath.toPath());
|
||||
Files.createSymbolicLink(symlinkPath.toPath(), newPath.toPath());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -81,10 +81,8 @@ public class KVersionRetriever implements Runnable, UncaughtExceptionHandler {
|
||||
JSONObject json = (JSONObject) sParser.parse(new InputStreamReader(
|
||||
response.getEntity().getContent()));
|
||||
String version = (String) json.get("version");
|
||||
if (DEBUG) {
|
||||
sLogger.info("Got the latest version: %s", version);
|
||||
sLogger.info("Current version is %s", sCurrentVersion);
|
||||
}
|
||||
sLogger.info("Got the latest version: %s", version);
|
||||
sLogger.info("Current version is %s", sCurrentVersion);
|
||||
if (!sCurrentVersion.equals(version)) {
|
||||
mCallback.newVersion(sCurrentVersion, version);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user