
::exists is implemented using ::stat. The ::stat routine returns an error on file sizes larger than 2 gigs in libc-2.3.2, and several others. So, very large files never exists (). Using ::access seems to fix the problem. =================================================================== RCS file: /cvsroot/boost/boost/libs/filesystem/src/operations_posix_windows.cpp,v retrieving revision 1.29 diff -c -r1.29 operations_posix_windows.cpp *** operations_posix_windows.cpp 6 Feb 2004 01:27:06 -0000 1.29 --- operations_posix_windows.cpp 9 Feb 2004 06:19:28 -0000 *************** *** 302,309 **** BOOST_FILESYSTEM_DECL bool exists( const path & ph ) { # ifdef BOOST_POSIX ! struct stat path_stat; ! return ::stat( ph.string().c_str(), &path_stat ) == 0; # else return ::GetFileAttributesA( ph.string().c_str() ) != 0xFFFFFFFF; # endif --- 302,308 ---- BOOST_FILESYSTEM_DECL bool exists( const path & ph ) { # ifdef BOOST_POSIX ! return ::access (ph.string ().c_str (), F_OK) == 0; # else return ::GetFileAttributesA( ph.string().c_str() ) != 0xFFFFFFFF; # endif