Boost logo

Boost :

From: Walter Landry (wlandry_at_[hidden])
Date: 2003-11-15 00:35:43


Greetings,

I found that remove_all wants to follow symlinks when recursing. This
causes it to fail if the target of the link does not exist. It also
seems a little dangerous. I have attached a patch to fix that.

Thanks,
Walter Landry
wlandry_at_[hidden]

--- /home/boo/arx/arx/src/boost/{arch}/++pristine-trees/unlocked/boost/boost--ar
x/boost--arx--1.0/wlandry_at_ucsd.edu--arx/boost--arx--1.0--patch-19/./libs/filesys
tem/src/operations_posix_windows.cpp 2003-11-14 21:55:07.000000000 -0500
+++ /home/boo/arx/arx/src/boost/./libs/filesystem/src/operations_posix_windows.c
pp 2003-11-15 00:28:22.000000000 -0500
@@ -164,7 +164,7 @@
   unsigned long remove_all_aux( const fs::path & ph )
   {
     unsigned long count = 1;
- if ( fs::is_directory( ph ) )
+ if ( !fs::is_link(ph) && fs::is_directory( ph ) )
     {
       for ( fs::directory_iterator itr( ph );
             itr != end_itr; ++itr )


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