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

[272708] [import/export] fix various bugs with the synchronization support

-detect conflict
This commit is contained in:
David McKnight 2009-04-22 17:37:03 +00:00
parent 72749117f2
commit 8e2ceb4803

View file

@ -175,7 +175,15 @@ public class FileSystemSubscriber extends ThreeWaySubscriber {
long storedModificationTime = properties.getRemoteFileTimeStamp();
if (remoteModificationTime > storedModificationTime){
base = new LocalResourceVariant(local);
// what if it's changed locally too?
long localDownloadTimeStamp = properties.getDownloadFileTimeStamp();
long localTimeStamp = local.getLocalTimeStamp();
if (localTimeStamp > localDownloadTimeStamp){
base = null; // conflict for both
}
else {
base = new LocalResourceVariant(local);
}
}
}
}