Fix path normalizer bug

This commit is contained in:
Alex Barney 2019-06-21 11:39:00 -05:00
parent a14b513b59
commit a43da54f95
2 changed files with 2 additions and 1 deletions

View file

@ -85,7 +85,7 @@ namespace LibHac.Fs
case NormalizeState.Initial:
isNormalized = false;
state = NormalizeState.Delimiter;
state = NormalizeState.Normal;
sb.Append(DirectorySeparator);
sb.Append(c);

View file

@ -24,6 +24,7 @@ namespace LibHac.Tests
new object[] {"/./aaa/bbb/ccc/.", "/aaa/bbb/ccc"},
new object[] {"/a/b/c/", "/a/b/c/"},
new object[] {"a/b/c/", "/a/b/c/"},
new object[] {"/aa/./bb/../cc/", "/aa/cc/"},
new object[] {"/./b/../c/", "/c/"},
new object[] {"/a/../../../", "/"},