repo: fix whitespace
This commit is contained in:
parent
6dd657a086
commit
106dc4ece3
|
@ -36,7 +36,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public abstract class SparkleRepoBase {
|
public abstract class SparkleRepoBase {
|
||||||
|
|
||||||
private string identifier;
|
private string identifier;
|
||||||
private TimeSpan short_interval = new TimeSpan (0, 0, 3, 0);
|
private TimeSpan short_interval = new TimeSpan (0, 0, 3, 0);
|
||||||
private TimeSpan long_interval = new TimeSpan (0, 0, 10, 0);
|
private TimeSpan long_interval = new TimeSpan (0, 0, 10, 0);
|
||||||
private TimeSpan poll_interval;
|
private TimeSpan poll_interval;
|
||||||
|
@ -137,28 +137,28 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Identifier {
|
public string Identifier {
|
||||||
get {
|
get {
|
||||||
if (this.identifier != null)
|
if (this.identifier != null)
|
||||||
return this.identifier;
|
return this.identifier;
|
||||||
|
|
||||||
string id_path = Path.Combine (LocalPath, ".sparkleshare");
|
string id_path = Path.Combine (LocalPath, ".sparkleshare");
|
||||||
|
|
||||||
if (File.Exists (id_path))
|
if (File.Exists (id_path))
|
||||||
this.identifier = File.ReadAllText (id_path).Trim ();
|
this.identifier = File.ReadAllText (id_path).Trim ();
|
||||||
|
|
||||||
if (this.identifier != null && this.identifier.Length > 0) {
|
if (this.identifier != null && this.identifier.Length > 0) {
|
||||||
return this.identifier;
|
return this.identifier;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.identifier = ComputeIdentifier ();
|
this.identifier = ComputeIdentifier ();
|
||||||
File.WriteAllText (id_path, this.identifier);
|
File.WriteAllText (id_path, this.identifier);
|
||||||
File.SetAttributes (id_path, FileAttributes.Hidden);
|
File.SetAttributes (id_path, FileAttributes.Hidden);
|
||||||
|
|
||||||
return this.identifier;
|
return this.identifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public SparkleRepoBase (string path)
|
public SparkleRepoBase (string path)
|
||||||
|
@ -359,8 +359,8 @@ namespace SparkleLib {
|
||||||
|
|
||||||
if (!pre_sync_revision.Equals (CurrentRevision)) {
|
if (!pre_sync_revision.Equals (CurrentRevision)) {
|
||||||
if (ChangeSets != null &&
|
if (ChangeSets != null &&
|
||||||
ChangeSets.Count > 0 &&
|
ChangeSets.Count > 0 &&
|
||||||
!ChangeSets [0].Added.Contains (".sparkleshare")) {
|
!ChangeSets [0].Added.Contains (".sparkleshare")) {
|
||||||
|
|
||||||
if (NewChangeSet != null)
|
if (NewChangeSet != null)
|
||||||
NewChangeSet (ChangeSets [0]);
|
NewChangeSet (ChangeSets [0]);
|
||||||
|
@ -371,12 +371,12 @@ namespace SparkleLib {
|
||||||
// conflict. Tries only once, then lets
|
// conflict. Tries only once, then lets
|
||||||
// the timer try again periodically
|
// the timer try again periodically
|
||||||
if (HasUnsyncedChanges) {
|
if (HasUnsyncedChanges) {
|
||||||
if (SyncStatusChanged != null)
|
if (SyncStatusChanged != null)
|
||||||
SyncStatusChanged (SyncStatus.SyncUp);
|
SyncStatusChanged (SyncStatus.SyncUp);
|
||||||
|
|
||||||
SyncUp ();
|
SyncUp ();
|
||||||
HasUnsyncedChanges = false;
|
HasUnsyncedChanges = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SyncStatusChanged != null)
|
if (SyncStatusChanged != null)
|
||||||
SyncStatusChanged (SyncStatus.Idle);
|
SyncStatusChanged (SyncStatus.Idle);
|
||||||
|
@ -397,7 +397,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
this.remote_timer.Start ();
|
this.remote_timer.Start ();
|
||||||
EnableWatching ();
|
EnableWatching ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CreateWatcher ()
|
private void CreateWatcher ()
|
||||||
|
|
Loading…
Reference in a new issue