repo: don't allow multiple syncs at the same time on startup. Fixes #985
This commit is contained in:
parent
321efb4384
commit
0286060d9a
|
@ -911,8 +911,9 @@ namespace SparkleLib.Git {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
git_status.StandardOutput.ReadToEnd();
|
git_status.StandardOutput.ReadToEnd ();
|
||||||
git_status.WaitForExit ();
|
git_status.WaitForExit ();
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,10 +193,10 @@ namespace SparkleLib {
|
||||||
|
|
||||||
// Sync up everything that changed
|
// Sync up everything that changed
|
||||||
// since we've been offline
|
// since we've been offline
|
||||||
if (HasLocalChanges) {
|
if (!this.is_syncing && (HasLocalChanges || HasUnsyncedChanges)) {
|
||||||
SyncUpBase ();
|
SyncUpBase ();
|
||||||
|
|
||||||
while (HasUnsyncedChanges)
|
while (HasLocalChanges)
|
||||||
SyncUpBase ();
|
SyncUpBase ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ namespace SparkleLib {
|
||||||
this.poll_interval = PollInterval.Long;
|
this.poll_interval = PollInterval.Long;
|
||||||
|
|
||||||
new Thread (() => {
|
new Thread (() => {
|
||||||
if (!is_syncing && !HasLocalChanges && HasRemoteChanges)
|
if (!this.is_syncing && !HasLocalChanges && HasRemoteChanges)
|
||||||
SyncDownBase ();
|
SyncDownBase ();
|
||||||
|
|
||||||
}).Start ();
|
}).Start ();
|
||||||
|
@ -430,7 +430,7 @@ namespace SparkleLib {
|
||||||
this.poll_interval = PollInterval.Long;
|
this.poll_interval = PollInterval.Long;
|
||||||
this.last_poll = DateTime.Now;
|
this.last_poll = DateTime.Now;
|
||||||
|
|
||||||
if (!is_syncing) {
|
if (!this.is_syncing) {
|
||||||
// Check for changes manually one more time
|
// Check for changes manually one more time
|
||||||
if (HasRemoteChanges)
|
if (HasRemoteChanges)
|
||||||
SyncDownBase ();
|
SyncDownBase ();
|
||||||
|
|
Loading…
Reference in a new issue