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:
parent
9437e74f89
commit
d5b99ef295
1 changed files with 18 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue