mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[272708] [import/export] fix various bugs with the synchronization support
-detect conflict
This commit is contained in:
parent
72749117f2
commit
8e2ceb4803
1 changed files with 9 additions and 1 deletions
|
@ -175,11 +175,19 @@ public class FileSystemSubscriber extends ThreeWaySubscriber {
|
||||||
long storedModificationTime = properties.getRemoteFileTimeStamp();
|
long storedModificationTime = properties.getRemoteFileTimeStamp();
|
||||||
|
|
||||||
if (remoteModificationTime > storedModificationTime){
|
if (remoteModificationTime > storedModificationTime){
|
||||||
|
// 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);
|
base = new LocalResourceVariant(local);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FileSystemSyncInfo info = new FileSystemSyncInfo(local, base, remote, new RSEResourceVariantComparator(getSynchronizer()));
|
FileSystemSyncInfo info = new FileSystemSyncInfo(local, base, remote, new RSEResourceVariantComparator(getSynchronizer()));
|
||||||
info.init();
|
info.init();
|
||||||
|
|
Loading…
Add table
Reference in a new issue