Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor

Showing 2 changed files with 20 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 0  FooSync.sln
  2. +18 1 FooSync/FooTree.cs
2  FooSync.sln
@@ -34,6 +34,7 @@ Global
34 34 {3A7B58E5-EFA8-4BDE-8117-644648488293}.Debug|x86.ActiveCfg = Debug|x86
35 35 {3A7B58E5-EFA8-4BDE-8117-644648488293}.Debug|x86.Build.0 = Debug|x86
36 36 {3A7B58E5-EFA8-4BDE-8117-644648488293}.Release|Any CPU.ActiveCfg = Release|x86
  37 + {3A7B58E5-EFA8-4BDE-8117-644648488293}.Release|Any CPU.Build.0 = Release|x86
37 38 {3A7B58E5-EFA8-4BDE-8117-644648488293}.Release|Mixed Platforms.ActiveCfg = Release|x86
38 39 {3A7B58E5-EFA8-4BDE-8117-644648488293}.Release|Mixed Platforms.Build.0 = Release|x86
39 40 {3A7B58E5-EFA8-4BDE-8117-644648488293}.Release|x86.ActiveCfg = Release|x86
@@ -45,6 +46,7 @@ Global
45 46 {94CE44D4-502A-4335-B28F-6E111FE867AA}.Debug|x86.ActiveCfg = Debug|x86
46 47 {94CE44D4-502A-4335-B28F-6E111FE867AA}.Debug|x86.Build.0 = Debug|x86
47 48 {94CE44D4-502A-4335-B28F-6E111FE867AA}.Release|Any CPU.ActiveCfg = Release|x86
  49 + {94CE44D4-502A-4335-B28F-6E111FE867AA}.Release|Any CPU.Build.0 = Release|x86
48 50 {94CE44D4-502A-4335-B28F-6E111FE867AA}.Release|Mixed Platforms.ActiveCfg = Release|x86
49 51 {94CE44D4-502A-4335-B28F-6E111FE867AA}.Release|Mixed Platforms.Build.0 = Release|x86
50 52 {94CE44D4-502A-4335-B28F-6E111FE867AA}.Release|x86.ActiveCfg = Release|x86
19 FooSync/FooTree.cs
@@ -48,7 +48,24 @@ private void Walk(string path, string basePath, IEnumerable<string> exceptions,
48 48 bool failsRegex = false;
49 49 foreach (string ex in exceptions)
50 50 {
51   - if (Regex.Match(System.IO.Path.GetFileName(file), ex, Foo.Options.CaseInsensitive ? RegexOptions.IgnoreCase : RegexOptions.None).Success)
  51 + string regex;
  52 + string searchAgainst;
  53 +
  54 + if (ex.EndsWith("/$"))
  55 + {
  56 + searchAgainst = System.IO.Path.GetDirectoryName(file) + System.IO.Path.DirectorySeparatorChar;
  57 + regex = ex.Substring(0, ex.Length - 2) + System.IO.Path.DirectorySeparatorChar;
  58 +
  59 + if (regex.EndsWith(@"\")) // can't end with a single backslash
  60 + regex += @"\";
  61 + }
  62 + else
  63 + {
  64 + searchAgainst = System.IO.Path.GetFileName(file);
  65 + regex = ex;
  66 + }
  67 +
  68 + if (Regex.Match(searchAgainst, regex, Foo.Options.CaseInsensitive ? RegexOptions.IgnoreCase : RegexOptions.None).Success)
52 69 {
53 70 failsRegex = true;
54 71 break;

No commit comments for this range

Something went wrong with that request. Please try again.