1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

Bug 149150

This commit is contained in:
Kushal Munir 2006-08-01 19:14:04 +00:00
parent a9b455c205
commit 8dcdc17ebc
4 changed files with 26 additions and 4 deletions

View file

@ -417,7 +417,11 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
(ISystemEditableRemoteObject) properties.getRemoteFileObject();
dirtyReplicas.add(editable);
}
else if (properties.getDownloadFileTimeStamp() != child.getLocalTimeStamp())
// get the modified timestamp from the File, not the IFile
// for some reason, the modified timestamp from the IFile does not always return
// the right value. There is a Javadoc comment saying the value from IFile might be a
// cached value and that might be the cause of the problem.
else if (properties.getDownloadFileTimeStamp() != child.getLocation().toFile().lastModified())
{
String ssString = properties.getRemoteFileSubSystem();
ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();

View file

@ -573,7 +573,12 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
properties.setDownloadFileTimeStamp(file.getLocalTimeStamp());
properties.setDirty(false);
properties.setUsedBinaryTransfer(remoteFile.isBinary());
properties.setDownloadFileTimeStamp(file.getLocalTimeStamp());
// get the modified timestamp from the File, not the IFile
// for some reason, the modified timestamp from the IFile does not always return
// the right value. There is a Javadoc comment saying the value from IFile might be a
// cached value and that might be the cause of the problem.
properties.setDownloadFileTimeStamp(file.getLocation().toFile().lastModified());
return true;
}

View file

@ -361,7 +361,15 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
if (!_changedResources.contains(resource) && !isIgnorable((IFile)resource))
{
SystemIFileProperties properties = new SystemIFileProperties(resource);
if (properties.getDownloadFileTimeStamp() != resource.getLocalTimeStamp())
long t1 = properties.getDownloadFileTimeStamp();
// get the modified timestamp from the File, not the IFile
// for some reason, the modified timestamp from the IFile does not always return
// the right value. There is a Javadoc comment saying the value from IFile might be a
// cached value and that might be the cause of the problem.
long t2 = resource.getLocation().toFile().lastModified();
if (t1 != t2)
{
String ssStr = properties.getRemoteFileSubSystem();
if (ssStr != null)

View file

@ -211,7 +211,12 @@ public class UniversalFileTransferUtility
String subSystemId = registry.getAbsoluteNameForSubSystem(subSystem);
properties.setRemoteFileSubSystem(subSystemId);
properties.setRemoteFilePath(remotePath);
properties.setDownloadFileTimeStamp(tempFile.getLocalTimeStamp());
// get the modified timestamp from the File, not the IFile
// for some reason, the modified timestamp from the IFile does not always return
// the right value. There is a Javadoc comment saying the value from IFile might be a
// cached value and that might be the cause of the problem.
properties.setDownloadFileTimeStamp(tempFile.getLocation().toFile().lastModified());
boolean isMounted = isRemoteFileMounted(subSystem, remotePath);
properties.setRemoteFileMounted(isMounted);