Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2004-04-18 21:04:45

Bugs item #937606, was opened at 2004-04-19 14:04
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jonathan Roewen (s-a-t-a-n)
Assigned to: Nobody/Anonymous (nobody)
Summary: filesystem::directory_iterator returns incorrect listing

Initial Comment:
directory_iterator doesn't work correctly under debian
linux (sarge/testing).

Returns an invalid iterator value, which can cause a
segmentation-fault, and drops the last item from the
resulting listing.

path dir = "my_dir";
if ( exists(dir) || !is_directory(dir) ) return;

directory_iterator itr(dir), end;

while ( itr != end ) {
  const path &p = *itr++;
  //-- do something with it

When I had a directory with only one file, no actual
filenames were returned. When calling methods such as
leaf() on const path &p, it would cause a seg-fault.


You can respond by visiting:

This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at