Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2012-07-10 16:16:03 -0400
committerMikhail Khodjaiants2012-07-10 16:20:56 -0400
commite19147b55497bae506455f597a319821e0cc9a08 (patch)
tree509601ef9dcfcbadc7b6c43bdb2fb6991cca7e6b /launch/org.eclipse.cdt.launch
parent9dbd7f7213be38eae81631be572bb9fc08c404e5 (diff)
downloadorg.eclipse.cdt-e19147b55497bae506455f597a319821e0cc9a08.tar.gz
org.eclipse.cdt-e19147b55497bae506455f597a319821e0cc9a08.tar.xz
org.eclipse.cdt-e19147b55497bae506455f597a319821e0cc9a08.zip
Bug 384780 - No error is reported if a directory is specified as program
path.
Diffstat (limited to 'launch/org.eclipse.cdt.launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
index 24c5a96682..ddf8c39f60 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
@@ -498,6 +498,11 @@ public class CMainTab extends CAbstractMainTab {
// Notice that we don't check if exePath points to a valid executable since such
// check is too expensive to be done on the UI thread.
// See "https://bugs.eclipse.org/bugs/show_bug.cgi?id=328012".
+ // We only verify that the program path represents a file.
+ if (!exePath.toFile().isFile()) {
+ setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Selection_must_be_file);
+ return (fPreviouslyCheckedProgramIsValid = false);
+ }
}
}

Back to the top