1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

fix for getParentPath

This commit is contained in:
David McKnight 2006-09-14 16:39:56 +00:00
parent 9437e74f89
commit d5b99ef295

View file

@ -102,10 +102,20 @@ public class DStoreHostFile implements IHostFile
return getParentPathFromPath(path); return getParentPathFromPath(path);
} }
else else
{
if (_element.getName().length() == 0)
{
// derive from value
String fullPath = _element.getValue();
int sep = fullPath.lastIndexOf('/');
return fullPath.substring(0, sep);
}
else
{ {
return _element.getValue(); return _element.getValue();
} }
} }
}
public boolean isHidden() public boolean isHidden()
{ {
@ -194,8 +204,13 @@ public class DStoreHostFile implements IHostFile
public String getAbsolutePath() public String getAbsolutePath()
{ {
String parentPath = getParentPath();
String name = _element.getName(); String name = _element.getName();
if (name.length() == 0)
{
return _element.getValue();
}
String parentPath = getParentPath();
String type = _element.getType(); String type = _element.getType();
if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))