id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 412,remove_all problems on dangling symlinks,cxdunn,beman_dawes,"{{{ remove_all() fails on dangling symlinks, and throws exception when they are in subdirs.
#include#include #include // for std::cout using namespace std; namespace fs = boost::filesystem; int main(){ system(""rm -rf foo1 foo2 foo3""); system(""ln -s nowhere foo1""); system(""mkdir foo2; touch foo2/blank; echo apple > foo2/apple""); system(""mkdir foo3; ln -s nowhere foo3/dangle""); try { fs::remove_all(""foo1""); //fine, but no deletion fs::remove_all(""foo2""); //fine fs::remove_all(""foo3""); //error } catch (fs::filesystem_error const& exc){ cerr <<""ERROR:"" < Result: ERROR:boost::filesystem::remove: ""foo3"": Directory not empty 0,1 0,0 1,0Also note that the post-condition is violated for foo1. }}}",Bugs,closed,,filesystem,None,,Out of Date,,