1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

[323299] [files] remote file view adapter needs to use the latest version of IRemoteFile

This commit is contained in:
David McKnight 2010-08-24 16:21:17 +00:00
parent 9d19f6ecb4
commit c71f34df0a

View file

@ -651,10 +651,14 @@ public class SystemViewRemoteFileAdapter
IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem();
// make sure we have the lastest cached version otherwise could be working with a bad file that never got marked as stale
IRemoteFile originalFile = file;
if (ss instanceof RemoteFileSubSystem){
IRemoteFile cachedFile = ((RemoteFileSubSystem)ss).getCachedRemoteFile(file.getAbsolutePath());
if (cachedFile != null){
file = cachedFile;
if (originalFile.isStale()){ // the original file was marked stale, so the cached one should be too
file.markStale(true);
}
}
}