https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69259
Bug ID: 69259 Summary: std::experimental::filesystem::copy does not create symlinks for directories Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: p...@x-fabric.com Target Milestone: --- The following test case fails when I try to soft-link the root directory to the current directory under the name "root". TEST_CASE("basic filesystem", "[basic]") { SECTION("symlink") { copy("/", "root", copy_options::create_symlinks); REQUIRE(exists("root")); } } The reason is that fs::copy(...) does not handle the case where the "from" parameter points to a directory, but options is set to copy_options::create_symlink. IMO, another section needs to be added at the bottom of the function else if (is_directory(f) && (is_set(options, copy_options::create_symlink)) { create_symlink(from, to, ec); } Thanks and regards, Roman