mac: fix crash in watcher. closes #1190

This commit is contained in:
Hylke Bons 2013-02-28 19:36:59 +00:00
parent 1e2e253f5b
commit 613b99b8dd

View file

@ -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);
}