Bug 11

Summary: is_regular_file fails for FILE_ATTRIBUTE_REPARSE_POINT
Product: Orthanc Reporter: Sébastien Jodogne <s.jodogne>
Component: Orthanc CoreAssignee: Sébastien Jodogne <s.jodogne>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: unspecified   
Hardware: All   
OS: All   

Description Sébastien Jodogne 2020-06-29 15:11:20 CEST
[BitBucket date: 2016-01-27.08:57:21]

To safe some disk space my IT enables the de-dublication on the disk where I put the OrthancStorage and since then I get the following error every time the server tries to access the files:

{noformat}
E0118 09:24:46.350888 Toolbox.cpp:213] The path does not point to a regular file: OrthancStorage-v6\af\75\af758685-2a3a-43af-89c9-6e1ed982ebfb
{noformat}

After looking into the sources I found that the boost function is_regular_file is used to determine if the file is valid.
Unfortunately the files handled by the windows system now have a different file_type in boost:
{noformat}
    reparse_file,  // Windows: FILE_ATTRIBUTE_REPARSE_POINT that is not a symlink
{noformat}

They are no symlink, no directory and no regular file either.So by checking is_regular_file() Orthanc runs into false negative cases.
Comment 1 Sébastien Jodogne 2020-06-29 15:18:48 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2016-01-28.16:06:57]

fix issue 11

→ https://hg.orthanc-server.com/orthanc/changeset/7a05144cb919