repo: Fix a possible race condition that can cause a double upload

This commit is contained in:
Hylke Bons 2013-05-29 12:09:39 +01:00
parent e188ae878c
commit 2f4231c073

View file

@ -260,13 +260,20 @@ namespace SparkleLib {
SparkleLogger.LogInfo ("Local", Name + " | Activity has settled");
IsBuffering = false;
if (HasLocalChanges) {
bool first_sync = true;
if (HasLocalChanges && Status == SyncStatus.Idle) {
do {
if (!first_sync)
SparkleLogger.LogInfo ("Local", Name + " | More changes found");
SyncUpBase ();
if (Error == ErrorStatus.UnreadableFiles)
return;
first_sync = false;
} while (HasLocalChanges);
} else {