mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
make excludes agnostic to trailing directory characters
This commit is contained in:
parent
38a7bb85d6
commit
aefe0f98c2
@ -83,7 +83,10 @@ namespace Twiglet.CS2J.Translator
|
|||||||
private static void addDirectories(IList<string> strs, string rawStr) {
|
private static void addDirectories(IList<string> strs, string rawStr) {
|
||||||
string[] argDirs = rawStr.Split(';');
|
string[] argDirs = rawStr.Split(';');
|
||||||
for (int i = 0; i < argDirs.Length; i++)
|
for (int i = 0; i < argDirs.Length; i++)
|
||||||
strs.Add(Path.GetFullPath(argDirs[i]));
|
{
|
||||||
|
string dir = Path.GetFullPath(argDirs[i]).TrimEnd(Path.DirectorySeparatorChar);
|
||||||
|
strs.Add(dir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addStrings(IList<string> strs, string rawStr) {
|
private static void addStrings(IList<string> strs, string rawStr) {
|
||||||
@ -277,7 +280,7 @@ namespace Twiglet.CS2J.Translator
|
|||||||
{
|
{
|
||||||
string canonicalPath = Path.GetFullPath(root);
|
string canonicalPath = Path.GetFullPath(root);
|
||||||
// If this is a directory, walk each file/dir in that directory
|
// If this is a directory, walk each file/dir in that directory
|
||||||
if (excludes == null || !excludes.Contains(canonicalPath))
|
if (excludes == null || !excludes.Contains(canonicalPath.TrimEnd(Path.DirectorySeparatorChar)))
|
||||||
{
|
{
|
||||||
if (Directory.Exists(canonicalPath))
|
if (Directory.Exists(canonicalPath))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user