From 0690182dc7ee52c470c27a393685e1845e69b73c Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Wed, 27 Aug 2014 11:44:04 +0300 Subject: [PATCH] simplified code --- .../eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java b/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java index 7c323b3..a10dabe 100755 --- a/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java +++ b/src/main/java/eu/svjatoslav/instantlauncher/menu/MultiLevelMenu.java @@ -113,12 +113,7 @@ public class MultiLevelMenu implements MenuListener { public void menuItemSelected(final Menu menu, final File chosenFile) { if (chosenFile.isFile()) if (chosenFile.canExecute()) - try { - Runtime.getRuntime().exec(chosenFile.getAbsolutePath()); - InstantLauncher.exitProgram(); - } catch (final IOException e) { - new ExceptionDialog(e); - } + executeCommand(chosenFile.getAbsolutePath()); else { final boolean fileOpened = FileAssociationManager.openFile(chosenFile); if (fileOpened) -- 2.20.1