From 582abf60995effca6e064a4b6eac7d2a195b02dc Mon Sep 17 00:00:00 2001 From: Eugene Tarassov Date: Tue, 10 Oct 2017 10:50:54 -0700 Subject: Bug 525816 - java.io.FileNotFoundException: /folk/wb-c7/ashi/dev/version2/system_viewer_wrlinux/hello_Linux (Is a directory) --- .../src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins') 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; } -- cgit v1.2.3