mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-07-25 12:04:26 +08:00
refs #22, copy_options now forwarded to copy_file, added test.
This commit is contained in:
parent
17bad8c51d
commit
8906e8ce91
@ -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);
|
copy_file(from, to / from.filename(), options, ec);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
copy_file(from, to, ec);
|
copy_file(from, to, options, ec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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/file1"));
|
||||||
CHECK(fs::exists("dir4/file2"));
|
CHECK(fs::exists("dir4/file2"));
|
||||||
CHECK(fs::exists("dir4/dir2/file3"));
|
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()) {
|
if (is_symlink_creation_supported()) {
|
||||||
TemporaryDirectory t(TempOpt::change_path);
|
TemporaryDirectory t(TempOpt::change_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user