statusicon: add lock. attempt to fix #1130
This commit is contained in:
parent
4be9ebe895
commit
72beb68a4c
|
@ -262,7 +262,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
new Thread (() => {
|
new Thread (() => {
|
||||||
string keys_path = Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath);
|
string keys_path = Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath);
|
||||||
string key_file_name = DateTime.Now.ToString ("yyyy-MM-dd_HH\\hmm"); // TODO: move to undercore name for old keys
|
string key_file_name = DateTime.Now.ToString ("yyyy-MM-dd_HH\\hmm");
|
||||||
|
|
||||||
string [] key_pair = SparkleKeys.GenerateKeyPair (keys_path, key_file_name);
|
string [] key_pair = SparkleKeys.GenerateKeyPair (keys_path, key_file_name);
|
||||||
SparkleKeys.ImportPrivateKey (key_pair [0]);
|
SparkleKeys.ImportPrivateKey (key_pair [0]);
|
||||||
|
|
|
@ -248,8 +248,11 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Object folders_lock = new Object ();
|
||||||
|
|
||||||
private void UpdateFolders ()
|
private void UpdateFolders ()
|
||||||
{
|
{
|
||||||
|
lock (this.folders_lock) {
|
||||||
List<string> folders = new List<string> ();
|
List<string> folders = new List<string> ();
|
||||||
List<string> folder_errors = new List<string> ();
|
List<string> folder_errors = new List<string> ();
|
||||||
|
|
||||||
|
@ -284,3 +287,4 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue