From 4b11ef55555bcb9961823f91f3eb8187a1bc2c2f Mon Sep 17 00:00:00 2001 From: Federico Blaseotto Date: Thu, 3 Oct 2024 00:26:38 +0200 Subject: [PATCH] Found bug in test? check. --- sources/OpenMcdf/CompoundFile.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/OpenMcdf/CompoundFile.cs b/sources/OpenMcdf/CompoundFile.cs index 87ed2c00..d55fa79b 100644 --- a/sources/OpenMcdf/CompoundFile.cs +++ b/sources/OpenMcdf/CompoundFile.cs @@ -1772,12 +1772,12 @@ public void SaveAs(string fileName) { Debug.WriteLine("Path is NOT rooted"); Debug.WriteLine("Filename:"+ fileName); - Debug.WriteLine("Filename modified:"+ (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\" + fileName)); + Debug.WriteLine("Filename modified:"+ (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar + fileName)); Debug.WriteLine("Directory name:"+ Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)); Debug.WriteLine("Stream name:"+ stream.Name); - Debug.WriteLine("Stream name equals filename? :" + (stream.Name == (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\" + fileName))); + Debug.WriteLine("Stream name equals filename? :" + (stream.Name == (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar + fileName))); - if (stream.Name == (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\" + fileName)) + if (stream.Name == (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar + fileName)) { Debug.WriteLine("-> Filename equals stream name:");