Boost logo

Boost :

From: SourceForge.net (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:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=937606&group_id=7586

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:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=937606&group_id=7586

-------------------------------------------------------
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
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk