Bug 11 - is_regular_file fails for FILE_ATTRIBUTE_REPARSE_POINT
Summary: is_regular_file fails for FILE_ATTRIBUTE_REPARSE_POINT
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Orthanc Core (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:11 CEST by Sébastien Jodogne
Modified: 2020-06-29 15:18 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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