repo: Fix a possible race condition that can cause a double upload
This commit is contained in:
parent
e188ae878c
commit
2f4231c073
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue