7 Commits

Author SHA1 Message Date
Andrey Semashev
29ef7d683d Reverted using std::filesystem::path to pass paths to file streams.
This doesn't compile with gcc 8 on MinGW-w64, and fails in runtime with
gcc 10.2 and clang 8.0.1 on Cygwin64 because character code conversion errors,
so basically std::filesystem never works with wide paths on Windows.

We still use wide paths as `const wchar_t*` with libc++ though.

Also, changed BOOST_FILESYSTEM_C_STR definition to accept the path as
an argument and use that definition in the tests rather than duplicating it.

Related to https://github.com/boostorg/filesystem/issues/181.
2021-06-09 18:28:28 +03:00
Andrey Semashev
c03249c375 Reformatted code for more consistent look and better readability. 2021-04-24 22:37:57 +03:00
Andrey Semashev
700a611850 Corrected console output in copy_test. 2020-07-07 17:28:28 +03:00
Andrey Semashev
a5fd89add9 Added a test for copy(ec) operation. 2020-07-07 15:58:59 +03:00
Andrey Semashev
16dcdbfa8f Fixed copy_test failures on Windows caused by incorrect symlink target.
The symlink was pointing at a directory rather than a file, which makes a
difference on Windows.
2020-05-12 02:32:36 +03:00
Andrey Semashev
d81944eec4 Added exception handling to copy_test. 2020-05-12 02:08:52 +03:00
Andrey Semashev
559b0c291a In copy, support symlink creation when target directory is not current.
When the source path is not absolute and copy_options::create_symlinks is
specified, deduce the relative path from the target location to the source
file to create a symlink. This allows to copy to a path that is not the current
path.

Also, added absolute overloads taking error_code argyment.

Also, when current_path() is used as a default argument to other operations,
and the operation also accepts error_code, use current_path(ec) to report
errors through the error code rather than throwing an exception.

Also, added a test for copy operation.
2020-05-11 15:10:23 +03:00