refs #22, copy_options now forwarded to copy_file, added test.

This commit is contained in:
Steffen Schuemann 2019-08-09 16:37:15 +02:00
parent 17bad8c51d
commit 8906e8ce91
2 changed files with 5 additions and 1 deletions

View File

@ -3169,7 +3169,7 @@ GHC_INLINE void copy(const path& from, const path& to, copy_options options, std
copy_file(from, to / from.filename(), options, ec);
}
else {
copy_file(from, to, ec);
copy_file(from, to, options, ec);
}
}
}

View File

@ -1553,6 +1553,10 @@ TEST_CASE("30.10.15.3 copy", "[filesystem][operations][fs.op.copy]")
CHECK(fs::exists("dir4/file1"));
CHECK(fs::exists("dir4/file2"));
CHECK(fs::exists("dir4/dir2/file3"));
fs::create_directory("dir5");
generateFile("dir5/file1");
CHECK_THROWS_AS(fs::copy("dir1/file1", "dir5/file1"), fs::filesystem_error);
CHECK_NOTHROW(fs::copy("dir1/file1", "dir5/file1", fs::copy_options::skip_existing));
}
if (is_symlink_creation_supported()) {
TemporaryDirectory t(TempOpt::change_path);