From e19147b55497bae506455f597a319821e0cc9a08 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Tue, 10 Jul 2012 16:16:03 -0400 Subject: [PATCH] Bug 384780 - No error is reported if a directory is specified as program path. --- .../src/org/eclipse/cdt/launch/ui/CMainTab.java | 5 +++++ 1 file changed, 5 insertions(+) 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 24c5a96682a..ddf8c39f60c 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); + } } }