From d4f3962b40173e842d227e951632d5bb6165a862 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Wed, 28 May 2008 12:02:50 +0000 Subject: [PATCH] Handle empty names in CygPath.getFileName, bug 214603. --- .../utils/org/eclipse/cdt/utils/CygPath.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java index 1670fd37e59..2dcfa88690b 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 QNX Software Systems and others. + * Copyright (c) 2000, 2008 QNX Software Systems 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 @@ -48,6 +48,10 @@ public class CygPath { } public String getFileName(String name) throws IOException { + // bug 214603, empty names don't create a response + if (name == null || name.length() == 0) + return name; + if (useOldCygPath) { return internalgetFileName(name); }