From 17f2e28fef388726f02eec78ba374ebf1dfbb96b Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Sun, 30 Nov 2008 02:49:13 +0000 Subject: [PATCH] Filesystem: fix #2542, wrong close 0 descriptor in copy_file_api on unix [SVN r50033] --- src/operations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/operations.cpp b/src/operations.cpp index defc409..e21fde3 100644 --- a/src/operations.cpp +++ b/src/operations.cpp @@ -1205,7 +1205,7 @@ namespace boost { const std::size_t buf_sz = 32768; boost::scoped_array 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