Opened 19 months ago

Last modified 19 months ago

#12640 new Bugs

is_empty and remove_all may throw even when called with error_code& argument.

Reported by: nigel.pattinson@… Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.62.0 Severity: Problem
Keywords: Cc:


Some of the code that underpins is_empty and remove_all constructs directory_iterator objects without passing through an error_code& argument. I have spotted this in both is_empty_directory and remove_all_aux . The latter also uses operator++ on the iterator rather than calling increment, I haven't checked whether this is more widespread.

Attachments (0)

Change History (1)

comment:1 Changed 19 months ago by ivan.mazovec@…

i have same problem.


boost::system::error_code e;
boost::filesystem::is_empty("/lost+found", e);


unknown location(0): fatal error: in "general_case": boost::filesystem::filesystem_error: boost::filesystem::directory_iterator::construct: Permission denied: "/lost+found"

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Beman Dawes.

Add Comment

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

Note: See TracTickets for help on using tickets.