mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 10:25:32 +02:00
[187732] if file doesn't exist, don't try to get the parent
This commit is contained in:
parent
59c2b899a3
commit
9e9213cb95
1 changed files with 9 additions and 5 deletions
|
@ -569,11 +569,15 @@ public class SystemViewRemoteFileAdapter
|
||||||
{
|
{
|
||||||
//System.out.println("Inside getParent for: "+element);
|
//System.out.println("Inside getParent for: "+element);
|
||||||
IRemoteFile file = (IRemoteFile) element;
|
IRemoteFile file = (IRemoteFile) element;
|
||||||
IRemoteFile parent = file.getParentRemoteFile();
|
if (file.exists())
|
||||||
if ((parent != null) && parent.getAbsolutePath().equals(file.getAbsolutePath()))
|
{
|
||||||
// should never happen but sometimes it does, leading to infinite loop.
|
IRemoteFile parent = file.getParentRemoteFile();
|
||||||
parent = null;
|
if ((parent != null) && parent.getAbsolutePath().equals(file.getAbsolutePath()))
|
||||||
return parent;
|
// should never happen but sometimes it does, leading to infinite loop.
|
||||||
|
parent = null;
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue