Skip to content

Commit 5eadd14

Browse files
author
Martin Plieske
committed
changed executeCommandLinux()
1 parent 8230bac commit 5eadd14

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/de/doubleslash/keeptime/common/FileOpenHelper.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ private static void executeCommandWindows(final Runtime rt, final File file) {
5858

5959
private static void executeCommandLinux(final Runtime rt, final String fileString) {
6060
try {
61-
final String command = "gedit '/home/Dokumente/haha.txt'";
62-
LOG.debug("executing command: {}", command);
61+
final String command = "'" + fileString + "'";
62+
LOG.debug("executing command: gedit {}", command);
6363

64-
rt.exec(command);
64+
rt.exec(new String[] {
65+
"gedit", command
66+
});
6567
} catch (final Exception e) {
6668
LOG.error(e.getMessage());
6769
}

0 commit comments

Comments
 (0)