Don't exclude all dotfiles, Fixes #495
This commit is contained in:
parent
54668c99c4
commit
aaf540a3ff
|
@ -59,6 +59,16 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override List<string> ExcludePaths {
|
||||||
|
get {
|
||||||
|
List<string> rules = new List<string> ();
|
||||||
|
rules.Add (Path.DirectorySeparatorChar + ".git");
|
||||||
|
|
||||||
|
return rules;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public override double Size {
|
public override double Size {
|
||||||
get {
|
get {
|
||||||
return CalculateSize (
|
return CalculateSize (
|
||||||
|
|
|
@ -66,6 +66,7 @@ namespace SparkleLib {
|
||||||
public abstract bool SyncDown ();
|
public abstract bool SyncDown ();
|
||||||
public abstract double CalculateSize (DirectoryInfo parent);
|
public abstract double CalculateSize (DirectoryInfo parent);
|
||||||
public abstract bool HasUnsyncedChanges { get; set; }
|
public abstract bool HasUnsyncedChanges { get; set; }
|
||||||
|
public abstract List<string> ExcludePaths { get; }
|
||||||
|
|
||||||
public abstract double Size { get; }
|
public abstract double Size { get; }
|
||||||
public abstract double HistorySize { get; }
|
public abstract double HistorySize { get; }
|
||||||
|
@ -342,9 +343,12 @@ namespace SparkleLib {
|
||||||
if (!this.watcher.EnableRaisingEvents)
|
if (!this.watcher.EnableRaisingEvents)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (args.FullPath.Contains (Path.DirectorySeparatorChar + ".") &&
|
string relative_path = args.FullPath.Replace (LocalPath, "");
|
||||||
!args.FullPath.Contains (Path.DirectorySeparatorChar + ".notes"))
|
|
||||||
|
foreach (string exclude_path in ExcludePaths) {
|
||||||
|
if (relative_path.Contains (exclude_path))
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
WatcherChangeTypes wct = args.ChangeType;
|
WatcherChangeTypes wct = args.ChangeType;
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace SparkleLib {
|
||||||
if (ChangeEvent != null)
|
if (ChangeEvent != null)
|
||||||
ChangeEvent (args);
|
ChangeEvent (args);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue