Skip to content

Commit 8f8ae9a

Browse files
committed
Fix unduping slashes: after the first one found, look for double-slashes again, not single. This also fixes the corresponding test.
1 parent 661f5d2 commit 8f8ae9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ICSharpCode.SharpZipLib/Zip/WindowsNameTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public static string MakeValidName(string name, char replacement)
158158
int index = name.IndexOf(string.Format("{0}{0}", Path.DirectorySeparatorChar), StringComparison.Ordinal);
159159
while (index >= 0) {
160160
name = name.Remove(index, 1);
161-
index = name.IndexOf(Path.DirectorySeparatorChar);
161+
index = name.IndexOf(string.Format("{0}{0}", Path.DirectorySeparatorChar), StringComparison.Ordinal);
162162
}
163163

164164
// Convert any invalid characters using the replacement one.

0 commit comments

Comments
 (0)