summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/file_system_manager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/file_system/file_system_manager.hpp')
-rw-r--r--src/buildtool/file_system/file_system_manager.hpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp
index a6d15c84..528d50ca 100644
--- a/src/buildtool/file_system/file_system_manager.hpp
+++ b/src/buildtool/file_system/file_system_manager.hpp
@@ -408,10 +408,10 @@ class FileSystemManager {
return false;
}
+ /// \brief Copy directory recursively
[[nodiscard]] static auto CopyDirectoryImpl(
std::filesystem::path const& src,
- std::filesystem::path const& dst,
- bool recursively = false) noexcept -> bool {
+ std::filesystem::path const& dst) noexcept -> bool {
try {
// also checks existence
if (not IsDirectory(src)) {
@@ -428,11 +428,10 @@ class FileSystemManager {
dst.string());
return false;
}
- auto const opts =
+ static constexpr auto kOptions =
std::filesystem::copy_options::copy_symlinks |
- (recursively ? std::filesystem::copy_options::recursive
- : std::filesystem::copy_options::none);
- std::filesystem::copy(src, dst, opts);
+ std::filesystem::copy_options::recursive;
+ std::filesystem::copy(src, dst, kOptions);
return true;
} catch (std::exception const& e) {
Logger::Log(LogLevel::Error,