mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-28 02:33:18 +02:00
[323299] [files] remote file view adapter needs to use the latest version of IRemoteFile
This commit is contained in:
parent
0fdcdaf37d
commit
ac14404a1f
1 changed files with 61 additions and 49 deletions
|
@ -67,6 +67,7 @@
|
|||
* David McKnight (IBM) - [309813] RSE permits opening of file after access removed
|
||||
* David McKnight (IBM) - [308221] Bidi3.6: Improper display of date in Properties and Table Views
|
||||
* David McKnight (IBM) - [317541] Show blank as the last modified for a file with no last modified
|
||||
* David McKnight (IBM) - [323299] [files] remote file view adapter needs to use the latest version of IRemoteFile
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
|
@ -168,6 +169,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
|
|||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileRoot;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
|
||||
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
|
||||
import org.eclipse.rse.ui.ISystemContextMenuConstants;
|
||||
|
@ -648,6 +650,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
|
||||
if (ss instanceof RemoteFileSubSystem){
|
||||
IRemoteFile cachedFile = ((RemoteFileSubSystem)ss).getCachedRemoteFile(file.getAbsolutePath());
|
||||
if (cachedFile != null){
|
||||
file = cachedFile;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
RemoteFileFilterString orgRffs = file.getFilterString();
|
||||
|
@ -746,6 +756,7 @@ public class SystemViewRemoteFileAdapter
|
|||
}
|
||||
}
|
||||
|
||||
synchronized (file){
|
||||
boolean hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance(), filter);
|
||||
|
||||
if (hasChildren && !file.isStale())
|
||||
|
@ -805,6 +816,7 @@ public class SystemViewRemoteFileAdapter
|
|||
} // message already issued
|
||||
}
|
||||
file.markStale(false);
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue