Add support for double backslashes to StringUtils#cleanPath

Closes gh-32962
This commit is contained in:
Sébastien Deleuze
2024-06-10 22:00:41 +02:00
parent 3b13f2ed38
commit c97a895f09
2 changed files with 14 additions and 2 deletions

View File

@@ -419,6 +419,7 @@ class StringUtilsTests {
assertThat(StringUtils.cleanPath("file:///c:/some/../path/the%20file.txt")).isEqualTo("file:///c:/path/the%20file.txt");
assertThat(StringUtils.cleanPath("jar:file:///c:\\some\\..\\path\\.\\the%20file.txt")).isEqualTo("jar:file:///c:/path/the%20file.txt");
assertThat(StringUtils.cleanPath("jar:file:///c:/some/../path/./the%20file.txt")).isEqualTo("jar:file:///c:/path/the%20file.txt");
assertThat(StringUtils.cleanPath("jar:file:///c:\\\\some\\\\..\\\\path\\\\.\\\\the%20file.txt")).isEqualTo("jar:file:///c:/path/the%20file.txt");
}
@Test