Skip to content

Commit

Permalink
Fix bug in exe file name
Browse files Browse the repository at this point in the history
  • Loading branch information
AmmarYasserAllaithy committed Dec 6, 2020
1 parent 6d93642 commit b7e14f4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
45 changes: 33 additions & 12 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/app/registry/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import static app.registry.WinRegistry.*;

public class Settings {
public static final String APP_NAME = "Mark as Completed";
public static final String
APP_NAME = "Mark as Completed",
EXE_NAME = APP_NAME.replace(" ", "-") + ".exe";

private enum T {FILES, DIRECTORIES}

Expand All @@ -15,7 +17,7 @@ public static boolean addRegistries() throws InvocationTargetException, IllegalA
}

public static boolean addRegistry(T t) throws InvocationTargetException, IllegalAccessException {
final String EXE_PATH = new File(System.getProperty("user.dir"), APP_NAME + ".exe").getAbsolutePath();
final String EXE_PATH = new File(System.getProperty("user.dir"), EXE_NAME).getAbsolutePath();
final String KEY_MAC = getKeyMacOf(t);
final String KEY_COMMAND = KEY_MAC + "\\command";

Expand Down

0 comments on commit b7e14f4

Please sign in to comment.