Re: [Boost-bugs] [Boost C++ Libraries] #5649: create_directories() fails with NTFS mounted volumes

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5649: create_directories() fails with NTFS mounted volumes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-06 20:05:40


#5649: create_directories() fails with NTFS mounted volumes
---------------------------------------------+------------------------
  Reporter: Tomas Kazmar <tomash.kazmar@…> | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.46.1 | Severity: Problem
Resolution: | Keywords:
---------------------------------------------+------------------------

Comment (by anonymous):

 in /libs/filesystem/src/operations.cpp (lines 1654-1672)


 {{{
     // reparse point handling;
     // since GetFileAttributesW does not resolve symlinks, try to open
 a file
     // handle to discover if the file exists
     if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
     {
       handle_wrapper h(
         create_file_handle(
             p.c_str(),
             0, // dwDesiredAccess; attributes only
             FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
             0, // lpSecurityAttributes
             OPEN_EXISTING,
             FILE_FLAG_BACKUP_SEMANTICS,
             0)); // hTemplateFile
       if (h.handle == INVALID_HANDLE_VALUE)
       {
         return process_status_failure(p, ec);
       }

       if (!is_reparse_point_a_symlink(p))
         return file_status(reparse_file, make_permissions(p, attr));
     }
 }}}

 changing
 {{{
 return file_status(reparse_file, make_permissions(p, attr));
 }}}
 to:

 return file_status('''directory_file''', make_permissions(p, attr));

 seems to fix this problem...of course i have no idea what new problems it
 might cause.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5649#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC