Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 5f069b5

Browse files
committed
Fix style of ZipFile.c_pathSeparator
[tfs-changeset: 1493462]
1 parent 23f8d69 commit 5f069b5

File tree

1 file changed

+4
-4
lines changed
  • src/System.IO.Compression.ZipFile/src/System/IO/Compression

1 file changed

+4
-4
lines changed

src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace System.IO.Compression
99
public static class ZipFile
1010
{
1111
// Per the .ZIP File Format Specification 4.4.17.1 all slashes should be forward slashes
12-
private const char c_pathSeparator = '/';
12+
private const char PathSeparator = '/';
1313

1414
/// <summary>
1515
/// Opens a <code>ZipArchive</code> on the specified path for reading. The specified file is opened with <code>FileMode.Open</code>.
@@ -521,14 +521,14 @@ private static void DoCreateFromDirectory(String sourceDirectoryName, String des
521521
{
522522
// FullName never returns a directory separator character on the end,
523523
// but Zip archives require it to specify an explicit directory:
524-
archive.CreateEntry(entryName + c_pathSeparator);
524+
archive.CreateEntry(entryName + PathSeparator);
525525
}
526526
}
527527
} // foreach
528528

529529
// If no entries create an empty root directory entry:
530530
if (includeBaseDirectory && directoryIsEmpty)
531-
archive.CreateEntry(EntryFromPath(di.Name, 0, di.Name.Length) + c_pathSeparator);
531+
archive.CreateEntry(EntryFromPath(di.Name, 0, di.Name.Length) + PathSeparator);
532532

533533
} // using
534534
} // DoCreateFromDirectory
@@ -560,7 +560,7 @@ private static string EntryFromPath(string entry, int offset, int length)
560560
for(int i = 0; i < chars.Length; i++)
561561
{
562562
if (chars[i] == Path.DirectorySeparatorChar || chars[i] == Path.AltDirectorySeparatorChar)
563-
chars[i] = c_pathSeparator;
563+
chars[i] = PathSeparator;
564564
}
565565

566566
return new string(chars);

0 commit comments

Comments
 (0)