Skip to content

Commit

Permalink
Switch to Path.DirectorySeparatorChar
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-sexenian committed Jun 10, 2024
1 parent 5b296d3 commit ccae7e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dotnet/GxCompress/GXCompressor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ private static void AddFileToZip(ZipArchive zos, FileInfo file, string baseDir)
DirectoryInfo[] directories = dir.GetDirectories();
foreach (DirectoryInfo childDir in directories)
{
AddFileToZip(zos, new FileInfo(childDir.FullName), entryName + "/");
AddFileToZip(zos, new FileInfo(childDir.FullName), entryName + Path.DirectorySeparatorChar.ToString());
}
foreach (FileInfo childFile in children)
{
AddFileToZip(zos, childFile, entryName + "/");
AddFileToZip(zos, childFile, entryName + Path.DirectorySeparatorChar.ToString());
}
}
else
Expand Down Expand Up @@ -284,7 +284,7 @@ private static void DecompressZip(FileInfo zipFile, string directory)

string fullResolvedPath = Path.GetFullPath(resolvedPath);

if (entry.FullName.EndsWith("/"))
if (entry.FullName.EndsWith(Path.DirectorySeparatorChar.ToString()))
{
if (!Directory.Exists(fullResolvedPath))
{
Expand Down

0 comments on commit ccae7e2

Please sign in to comment.