Skip to content
Snippets Groups Projects
Commit e519f4cc authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #216 - updater --> downloaded exe is not runnable

parent 40b0044f
No related branches found
No related tags found
1 merge request!222merge v1_7_0 into master
...@@ -119,15 +119,10 @@ public class Updater ...@@ -119,15 +119,10 @@ public class Updater
{ {
File currentExecutable = getCurrentExecutableName(); File currentExecutable = getCurrentExecutableName();
String currentFileName = currentExecutable.getName(); String currentFileName = currentExecutable.getName();
String fileEnding;
//check if BudgetMaster is running from executable //check if BudgetMaster is running from executable
//no updating procedure if running from source //no updating procedure if running from source
if(currentFileName.contains(".")) if(!currentFileName.contains("."))
{
fileEnding = currentExecutable.getAbsolutePath().substring(currentExecutable.getAbsolutePath().indexOf("."), currentExecutable.getAbsolutePath().length());
}
else
{ {
Logger.debug("Update procedure will be skipped because BudgetMaster is running from source"); Logger.debug("Update procedure will be skipped because BudgetMaster is running from source");
return; return;
...@@ -141,7 +136,7 @@ public class Updater ...@@ -141,7 +136,7 @@ public class Updater
//download into temp directory and file //download into temp directory and file
Path target; Path target;
if(fileEnding.equalsIgnoreCase("exe")) if(currentFileName.endsWith(".exe"))
{ {
target = Paths.get(PathUtils.getOSindependentPath() + Localization.getString(Strings.FOLDER) + "/update_BudgetMaster.exe"); target = Paths.get(PathUtils.getOSindependentPath() + Localization.getString(Strings.FOLDER) + "/update_BudgetMaster.exe");
download(BUILD_FOLDER + "BudgetMaster.exe", target); download(BUILD_FOLDER + "BudgetMaster.exe", target);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment