Skip to content

Commit

Permalink
Checking path Ubuntu test
Browse files Browse the repository at this point in the history
  • Loading branch information
ironfede committed Oct 2, 2024
1 parent e517373 commit 75acb04
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions sources/OpenMcdf/CompoundFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1756,24 +1756,30 @@ public void SaveAs(string fileName)
{
if (Path.IsPathRooted(fileName))
{
Debug.WriteLine("Path is rooted. Filename:"+ fileName);
Debug.WriteLine("Path is rooted");
Debug.WriteLine("Filename:"+ fileName);
Debug.WriteLine("Stream name:"+ stream.Name);
Debug.WriteLine("Stream name equals filename? :" + (stream.Name == fileName));

if (stream.Name == fileName)
{
Debug.WriteLine("Filename equals stream name:"+ stream.Name);
Debug.WriteLine("-> Filename equals stream name");

raiseSaveFileEx = true;
}
}
else
{
Debug.WriteLine("Path is NOT rooted. Filename:"+ 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("Directory name:"+ Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location));
Debug.WriteLine("Path is NOT rooted. Stream name:"+ stream.Name);

Debug.WriteLine("Stream name:"+ stream.Name);
Debug.WriteLine("Stream name equals filename? :" + (stream.Name == (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\" + fileName)));

if (stream.Name == (Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\" + fileName))
{
Debug.WriteLine("Filename equals stream name:"+ stream.Name);
Debug.WriteLine("-> Filename equals stream name:");

raiseSaveFileEx = true;
}
Expand Down

0 comments on commit 75acb04

Please sign in to comment.