From a43da54f958a55a9e826503e34ffb7213847c442 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Fri, 21 Jun 2019 11:39:00 -0500 Subject: [PATCH] Fix path normalizer bug --- src/LibHac/Fs/PathTools.cs | 2 +- tests/LibHac.Tests/PathToolsTests.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/LibHac/Fs/PathTools.cs b/src/LibHac/Fs/PathTools.cs index 15cb3aaf..c593714b 100644 --- a/src/LibHac/Fs/PathTools.cs +++ b/src/LibHac/Fs/PathTools.cs @@ -85,7 +85,7 @@ namespace LibHac.Fs case NormalizeState.Initial: isNormalized = false; - state = NormalizeState.Delimiter; + state = NormalizeState.Normal; sb.Append(DirectorySeparator); sb.Append(c); diff --git a/tests/LibHac.Tests/PathToolsTests.cs b/tests/LibHac.Tests/PathToolsTests.cs index c3802d04..76a00538 100644 --- a/tests/LibHac.Tests/PathToolsTests.cs +++ b/tests/LibHac.Tests/PathToolsTests.cs @@ -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/../../../", "/"},