id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2925,boost::filesystem cannot atomically copy file if target exists,andre-boost@…,Beman Dawes," The following code leads to race conditions, i.e. can fail with 'file exists' if another process interferes (pseudo code) {{{ void copy (std::string src, std::string target, int flags) { if ( (flags & Overwrite) && boost::fs::exists (tgt) ) { boost::fs::remove (tgt); } // second process can create file again here boost::fs::copy_file (src, tgt); } }}} I think similar problems are obvious for other boost::fs operations. A solution would be to allow flags for boost's operations, and forward them to open (that is where the current code bails out I think). Other solutions are possible, too, like adding another call which allows overwrite. Thanks, Andre. ",Bugs,closed,Boost 1.39.0,filesystem,Boost 1.38.0,Problem,fixed,,