Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50033 - trunk/libs/filesystem/src
From: bdawes_at_[hidden]
Date: 2008-11-29 21:49:14


Author: bemandawes
Date: 2008-11-29 21:49:13 EST (Sat, 29 Nov 2008)
New Revision: 50033
URL: http://svn.boost.org/trac/boost/changeset/50033

Log:
Filesystem: fix #2542, wrong close 0 descriptor in copy_file_api on unix
Text files modified:
   trunk/libs/filesystem/src/operations.cpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/libs/filesystem/src/operations.cpp
==============================================================================
--- trunk/libs/filesystem/src/operations.cpp (original)
+++ trunk/libs/filesystem/src/operations.cpp 2008-11-29 21:49:13 EST (Sat, 29 Nov 2008)
@@ -1205,7 +1205,7 @@
       {
         const std::size_t buf_sz = 32768;
         boost::scoped_array<char> buf( new char [buf_sz] );
- int infile=0, outfile=0; // init quiets compiler warning
+ int infile=-1, outfile=-1; // -1 means not open
         struct stat from_stat;
 
         if ( ::stat( from_file_ph.c_str(), &from_stat ) != 0


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