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