mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 05:15:43 +02:00
Handle empty names in CygPath.getFileName, bug 214603.
This commit is contained in:
parent
9284cb176d
commit
d4f3962b40
1 changed files with 5 additions and 1 deletions
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -48,6 +48,10 @@ public class CygPath {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFileName(String name) throws IOException {
|
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) {
|
if (useOldCygPath) {
|
||||||
return internalgetFileName(name);
|
return internalgetFileName(name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue