mac: fix crash in watcher. closes #1190
This commit is contained in:
parent
1e2e253f5b
commit
613b99b8dd
|
@ -151,6 +151,7 @@ namespace SparkleShare {
|
|||
|
||||
var handler = Changed;
|
||||
if (handler != null) {
|
||||
if (paths [0].Length >= Path.Length) {
|
||||
string path = paths [0];
|
||||
path = path.Substring (Path.Length);
|
||||
path = path.Trim ("/".ToCharArray ());
|
||||
|
@ -158,6 +159,7 @@ namespace SparkleShare {
|
|||
if (!string.IsNullOrWhiteSpace (path))
|
||||
handler (path);
|
||||
}
|
||||
}
|
||||
|
||||
GC.KeepAlive (this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue