Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2017-10-10 17:50:54 +0000
committerEugene Tarassov2017-10-10 17:50:54 +0000
commit582abf60995effca6e064a4b6eac7d2a195b02dc (patch)
tree86f71a74546c1c0fb2519fdfb11690acacb9c903
parentbcc7c05d2919a102cb4df4cea46da9dde6f2973f (diff)
downloadorg.eclipse.tcf-582abf60995effca6e064a4b6eac7d2a195b02dc.tar.gz
org.eclipse.tcf-582abf60995effca6e064a4b6eac7d2a195b02dc.tar.xz
org.eclipse.tcf-582abf60995effca6e064a4b6eac7d2a195b02dc.zip
Bug 525816 - java.io.FileNotFoundException: /folk/wb-c7/ashi/dev/version2/system_viewer_wrlinux/hello_Linux (Is a directory)
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
index 4a66ec42e..1572010d6 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2016 Wind River Systems, Inc. and others.
+ * Copyright (c) 2008, 2017 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.tcf.internal.cdt.ui;
+import java.io.File;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -269,6 +270,10 @@ public class TCFLaunchContext implements ITCFLaunchContext {
* @throws CoreException
*/
public boolean isBinary(IProject project, IPath path) throws CoreException {
+ /* Note: CDT throws an exception if 'path' is not a regular file */
+ if (path == null) return false;
+ File file = path.toFile();
+ if (file == null || !file.isFile()) return false;
return LaunchUtils.getBinary(project, path) != null;
}

Back to the top