[Boost-bugs] [Boost C++ Libraries] #4610: filesystem::file_size problem on Windows platform

Subject: [Boost-bugs] [Boost C++ Libraries] #4610: filesystem::file_size problem on Windows platform
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-08-29 15:52:05


#4610: filesystem::file_size problem on Windows platform
-----------------------------------+----------------------------------------
 Reporter: neo_in_matrix@… | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
-----------------------------------+----------------------------------------
 This is a subtle problem on Windows platform.

 I see that file_size calls GetFileAttributesEx to obtain file size - that
 works in a chance of 99.99%.

 What is the other 0.01%? It's like this - GetFileAttributes(Ex) does not
 work with system files, say c:\pagefile.sys. It will only return FALSE and
 GetLastError returns 32 (The process cannot access the file because it is
 being used by another process. )

 Instead, you have to call FindFirstFile which correctly reports file
 status in all cases.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4610>
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:04 UTC