Opened 9 years ago

Closed 9 years ago

#2531 closed Patches (fixed)

Workaround for broken remove() broken

Reported by: Niklas Angare <li51ckf02@…> Owned by: Beman Dawes
Milestone: Boost 1.38.0 Component: filesystem
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:


operations_test fails on QNX 6.4.0 with:
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.

Attachments (1)

operations.cpp.patch (410 bytes) - added by Niklas Angare <li51ckf02@…> 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by Niklas Angare <li51ckf02@…>

Attachment: operations.cpp.patch added

comment:1 Changed 9 years ago by Beman Dawes

Resolution: fixed
Status: newclosed

(In [50562]) Filesystem: Fix #2531 by applying suggested patch

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Beman Dawes.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.