Change dependency of file size check from Update file to current running
file.
This commit is contained in:
parent
57932c58a3
commit
b3044fd600
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -265,10 +265,11 @@ public class sigIRC{
|
||||
File updatedir = new File(sigIRC.BASEDIR+"sigIRC/updates/");
|
||||
updatedir.mkdirs();
|
||||
File programFile = new File(sigIRC.BASEDIR+"sigIRC/updates/sigIRCv2.jar");
|
||||
System.out.println("File size is "+programFile.length());
|
||||
File currentProgramFile = new File(sigIRC.BASEDIR+"sigIRCv2.jar");
|
||||
System.out.println("File size is "+currentProgramFile.length());
|
||||
long fileSize = GithubUtils.getSizeOfFileFromLatestGithubCommit("sigIRCv2.jar");
|
||||
System.out.println("File size on Github is "+fileSize);
|
||||
if ((programFile.exists() && fileSize!=programFile.length()) || !programFile.exists()) {
|
||||
if (fileSize!=programFile.length()) {
|
||||
try {
|
||||
if (programFile.exists()) {
|
||||
programFile.delete();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user