Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78078 - in trunk/libs/filesystem: doc doc/src src
From: bdawes_at_[hidden]
Date: 2012-04-19 08:45:43


Author: bemandawes
Date: 2012-04-19 08:45:42 EDT (Thu, 19 Apr 2012)
New Revision: 78078
URL: http://svn.boost.org/trac/boost/changeset/78078

Log:
Filesystem: Fix #6809, Implementation of filesystem::rename() method for MS Windows is wrong, by adding MOVEFILE_COPY_ALLOWED to deal with renames across drives, volumes, file systems. Fix has no effect on non-Windows systems.
Text files modified:
   trunk/libs/filesystem/doc/release_history.html | 6 +++++-
   trunk/libs/filesystem/doc/src/tr2_snippets.html | 13 +++++--------
   trunk/libs/filesystem/src/operations.cpp | 2 +-
   3 files changed, 11 insertions(+), 10 deletions(-)

Modified: trunk/libs/filesystem/doc/release_history.html
==============================================================================
--- trunk/libs/filesystem/doc/release_history.html (original)
+++ trunk/libs/filesystem/doc/release_history.html 2012-04-19 08:45:42 EDT (Thu, 19 Apr 2012)
@@ -70,6 +70,10 @@
   compilers if static linking is used.</li>
   <li>Add path::operator+= and concat functions to tack on things like suffixes
   or numbers. Suggested by Ed Smith-Rowland and others.</li>
+ <li>Fix #6809,
+ Implementation of filesystem::rename() method for MS Windows is wrong, by
+ adding MOVEFILE_COPY_ALLOWED to deal with renames across drives, volumes, file
+ systems. Fix has no effect on non-Windows systems.</li>
 </ul>
 
 <h2>1.49.0</h2>
@@ -154,7 +158,7 @@
 </ul>
 <hr>
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->18 April, 2012<!--webbot bot="Timestamp" endspan i-checksum="29869" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->19 April, 2012<!--webbot bot="Timestamp" endspan i-checksum="29871" --></p>
 <p>© Copyright Beman Dawes, 2011</p>
 <p> Use, modification, and distribution are subject to the Boost Software
 License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">

Modified: trunk/libs/filesystem/doc/src/tr2_snippets.html
==============================================================================
--- trunk/libs/filesystem/doc/src/tr2_snippets.html (original)
+++ trunk/libs/filesystem/doc/src/tr2_snippets.html 2012-04-19 08:45:42 EDT (Thu, 19 Apr 2012)
@@ -158,6 +158,8 @@
   <ul>
     <li>Apply more C++0X features. Boost.Filesystem needs to implement these to verify their
     application is correct.</li>
+ <li>Ion Todirel suggests &quot;Would be nice if path::append was variadic, to
+ improve usability&quot;.</li>
     <li>Boost.Filesystem needs to implement <code>char16_t</code> and <code>char32_t</code> support to verify the
     specification for these is correct.</li>
     <li>The Boost implementation has more class path non-member relational
@@ -177,12 +179,6 @@
     per LWG discussion in Kona. </li>
     <li>Add [section.name] and, if possible, section numbering, per LWG
     discussion in Kona.</li>
- <li>Add Ed Smith-Rowland's suggestion: <br>
- &gt;path&amp; path+=(const path&amp; p);<br>
- &gt; and<br>
- &gt; path operator+(const path&amp; lhs, const path&amp; rhs);<br>
- &gt; to tack on things like suffixes or numbers on the end of files.<br>
- &gt; This has no real semantics, it just concatenates pathnames.</li>
     <li>Ed Smith-Rowland:<br>
     &gt; I found it less confusing to switch to positive logic for
     recursive_directory_iterator:<br>
@@ -200,8 +196,9 @@
     for this.</li>
     <li>recursive_directory_iterator is specified in terms of private data
     members. Remove these (including the comment!) and specify in terms of
- behavior only.<br>
-&nbsp;</li>
+ behavior only.</li>
+ <li>Ion Todirel: Would be nice to have a make_relative. Need to review
+ similar suggestions.</li>
   </ul>
   
   $endid

Modified: trunk/libs/filesystem/src/operations.cpp
==============================================================================
--- trunk/libs/filesystem/src/operations.cpp (original)
+++ trunk/libs/filesystem/src/operations.cpp 2012-04-19 08:45:42 EDT (Thu, 19 Apr 2012)
@@ -223,7 +223,7 @@
 # define BOOST_DELETE_FILE(P)(::DeleteFileW(P)!= 0)
 # define BOOST_COPY_DIRECTORY(F,T)(::CreateDirectoryExW(F, T, 0)!= 0)
 # define BOOST_COPY_FILE(F,T,FailIfExistsBool)(::CopyFileW(F, T, FailIfExistsBool)!= 0)
-# define BOOST_MOVE_FILE(OLD,NEW)(::MoveFileExW(OLD, NEW, MOVEFILE_REPLACE_EXISTING)!= 0)
+# define BOOST_MOVE_FILE(OLD,NEW)(::MoveFileExW(OLD, NEW, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED)!= 0)
 # define BOOST_RESIZE_FILE(P,SZ)(resize_file_api(P, SZ)!= 0)
 # define BOOST_READ_SYMLINK(P,T)
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk