3
0

Fix symlink recreation

This commit is contained in:
Prototik 2015-05-31 19:04:51 +07:00
parent 06c15c597d
commit 3defbbe725
2 changed files with 3 additions and 7 deletions

View File

@ -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) {

View File

@ -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 {