Hi,
I think I've found a problem with this function. On Windows 98/Me computers, it can fail with path not found error (3) if the from path is on a network share.
*&%#! and several other words not fit for a public mailing list. If you ever hear I've gone crazy, blame differing Windows versions. Although I'm reading a book that tries to explain the differences between Unix flavors, and that is a mess too.
I would suggest the following change to src\filesystem\operations_posix_windows.cpp:
Currently:
if ( !::CopyFileA( from_file_ph.string().c_str(), to_file_ph.string().c_str(), /*fail_if_exists=*/true ) ) Suggested change:
if ( !::CopyFileA( from_file_ph.native_file_string().c_str(), to_file_ph.native_file_string().c_str(), /*fail_if_exists=*/true ) )
There may be other areas in the filesystem code where it would be better to use native_file_string().
It may be that all uses should be changed. I'm a bit worried about doing that so close to the 1.33 release. Not to mention that that code is about to be retired anyhow. Let me sleep on it. I've also got to find a machine to test on; I never owned a copy of Win 98/me. Thanks for the report. --Beman