1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 384756 - Projectless debugging: no error is reported if a directory

is specified as the program path

Change-Id: I4800d6851d3d086cc59963bd2bd44e4584a78d0b
Reviewed-on: https://git.eclipse.org/r/6691
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
This commit is contained in:
Mikhail Khodjaiants 2012-07-10 13:34:38 -04:00
parent 040b82128a
commit 5e5d6a0505

View file

@ -470,10 +470,15 @@ public class CMainTab extends CAbstractMainTab {
if (exePath.isAbsolute()) {
// For absolute paths, we don't need a project, we can debug the binary directly
// as long as it exists
if (!exePath.toFile().exists()) {
File executable = exePath.toFile();
if (!executable.exists()) {
setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
return false;
}
if (!executable.isFile()) {
setErrorMessage(LaunchMessages.getString("CMainTab.Selection_must_be_file")); //$NON-NLS-1$
return false;
}
} else {
// For relative paths, we need a proper project
String projectName = fProjText.getText().trim();