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 {
|
||||
get {
|
||||
return CalculateSize (
|
||||
|
|
|
@ -66,6 +66,7 @@ namespace SparkleLib {
|
|||
public abstract bool SyncDown ();
|
||||
public abstract double CalculateSize (DirectoryInfo parent);
|
||||
public abstract bool HasUnsyncedChanges { get; set; }
|
||||
public abstract List<string> ExcludePaths { get; }
|
||||
|
||||
public abstract double Size { get; }
|
||||
public abstract double HistorySize { get; }
|
||||
|
@ -342,9 +343,12 @@ namespace SparkleLib {
|
|||
if (!this.watcher.EnableRaisingEvents)
|
||||
return;
|
||||
|
||||
if (args.FullPath.Contains (Path.DirectorySeparatorChar + ".") &&
|
||||
!args.FullPath.Contains (Path.DirectorySeparatorChar + ".notes"))
|
||||
return;
|
||||
string relative_path = args.FullPath.Replace (LocalPath, "");
|
||||
|
||||
foreach (string exclude_path in ExcludePaths) {
|
||||
if (relative_path.Contains (exclude_path))
|
||||
return;
|
||||
}
|
||||
|
||||
WatcherChangeTypes wct = args.ChangeType;
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace SparkleLib {
|
|||
if (ChangeEvent != null)
|
||||
ChangeEvent (args);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue