Subject: [Boost-bugs] [Boost C++ Libraries] #7307: boost::filesystem::remove_all(dirname, ec) throws on write protected directories
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-31 08:53:52
#7307: boost::filesystem::remove_all(dirname,ec) throws on write protected
directories
-------------------------------+--------------------------------------------
Reporter: bach@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.50.0
Severity: Problem | Keywords:
-------------------------------+--------------------------------------------
Hi there,
according to the documentation, functions with error_code should not throw
except if storage cannot be allocated.
The following throws if directory "bla" exists but is write protected:
{{{
string bla("bla");
boost::system::error_code ec;
boost::filesystem::remove_all(bla,ec);
}}}
The bla directory looks like this:
{{{
ls -l bla
d--------- 2 bach bach 4096 2012-08-30 23:56 bla
}}}
Output of the program is:
''terminate called after throwing an instance of
"boost::filesystem::filesystem_error"
what(): boost::filesystem::directory_iterator::construct: Permission
denied: "bla"
Aborted
''
System: Ubuntu 9.10
Boost: 1.50, looking through change notes for 1.51 I did not see any
entries for filesystem which could address this.
Best,
Bastien
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7307> 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:10 UTC