diff --git a/CHANGELOG.md b/CHANGELOG.md index 34c7be7..358e581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ A backup will be made when converting. If you want to downgrade to a previous ve - Pressing escape when a dialog is open will close the dialog - Version check is done using the GitHub version api and will notify when a new snapshot is available - [Linux] #44 - pactl commands are run in English so that their output can be parsed correctly +- [Windows] #57 - The end focussed task command works again **Fixes within the snapshot:** (not relevant when not upgrading from a previous snapshot) diff --git a/src/main/java/com/getpcpanel/util/IPlatformCommand.java b/src/main/java/com/getpcpanel/util/IPlatformCommand.java index 091625f..62fbf06 100644 --- a/src/main/java/com/getpcpanel/util/IPlatformCommand.java +++ b/src/main/java/com/getpcpanel/util/IPlatformCommand.java @@ -80,12 +80,16 @@ public void exec(String shortcut) { @Override public void kill(String process) { - var toKill = FOCUS.equals(process) ? sndCtrl.getFocusApplication() : process; + var toKill = stripFile(FOCUS.equals(process) ? sndCtrl.getFocusApplication() : process); try { rt.exec("cmd.exe /c taskkill /IM " + toKill + " /F"); } catch (IOException e) { log.error("Unable to end '{}'", toKill, e); } } + + private String stripFile(String file) { + return new File(file).getName(); + } } }