[Boost-bugs] [Boost C++ Libraries] #2531: Workaround for broken remove() broken

Subject: [Boost-bugs] [Boost C++ Libraries] #2531: Workaround for broken remove() broken
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-24 02:14:29


#2531: Workaround for broken remove() broken
------------------------------------------------------+---------------------
 Reporter: Niklas Angare <li51ckf02_at_[hidden]> | Owner: bemandawes
     Type: Patches | Status: new
Milestone: Boost 1.38.0 | Component: filesystem
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
------------------------------------------------------+---------------------
 operations_test fails on QNX 6.4.0 with:[[BR]]
 Warning: line 820 exception reports default_error_condition().value() 1,
 should be 93

 Line 821 also fails with boost::filesystem::remove: Operation not
 permitted.

 The problem is that a workaround for QNX and other OSes in posix_remove()
 compares the return value of unlink() against EPERM instead of comparing
 errno against EPERM.

 Could it ever have worked? EPERM is typically 1 while the return value
 from unlink() in case of failure is typically -1.

 The attached patch resolves the issue and the operations_test test now
 passes. As a side note, the test also passes fully with the workaround
 disabled on QNX 6.4.0.

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