1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 10:46: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

@ -103,7 +103,17 @@ public class DStoreHostFile implements IHostFile
}
else
{
return _element.getValue();
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();
}
}
}
@ -193,9 +203,14 @@ public class DStoreHostFile implements IHostFile
public String getAbsolutePath()
{
String parentPath = getParentPath();
{
String name = _element.getName();
if (name.length() == 0)
{
return _element.getValue();
}
String parentPath = getParentPath();
String type = _element.getType();
if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))