Menu

#567 Directory class Load method adds forward slash on windows OS

3.1
open
nobody
None
4
2025-03-21
2025-03-21
Ziv Yaniv
No

The paths to files created by the Directory class' Load method on a windows system result in a combination of backslashes for most of the path and the last entry is a forward slash followed by the filename (e.g. C:\test_dir\sub_dir/1.dcm). This is not a valid file path on windows.

Python code illustrating the issue:

import gdcm
import os

gdcm_dir = gdcm.Directory()
if gdcm_dir.Load(os.path.abspath(".")) > 0:
  print(gdcm_dir.GetFilenames())

Discussion


Log in to post a comment.

MongoDB Logo MongoDB