mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-17 19:53:02 +00:00
Fix(?) Windows-only path for MS-CAB
This commit is contained in:
@@ -102,7 +102,14 @@ namespace BinaryObjectScanner.FileType
|
||||
{
|
||||
try
|
||||
{
|
||||
string tempFile = Path.Combine(outDir, compressedFile.Filename);
|
||||
// Ensure directory separators are consistent
|
||||
string fileName = compressedFile.Filename;
|
||||
if (Path.DirectorySeparatorChar == '\\')
|
||||
fileName = fileName.Replace('/', '\\');
|
||||
else if (Path.DirectorySeparatorChar == '/')
|
||||
fileName = fileName.Replace('\\', '/');
|
||||
|
||||
string tempFile = Path.Combine(outDir, fileName);
|
||||
var directoryName = Path.GetDirectoryName(tempFile);
|
||||
if (directoryName != null && !Directory.Exists(directoryName))
|
||||
Directory.CreateDirectory(directoryName);
|
||||
|
||||
Reference in New Issue
Block a user