Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdea1er committed Feb 4, 2024
1 parent c6e2305 commit 2e4d2e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ fs::path path::release() noexcept {
}

void path::move(const fs::path& to) {
std::error_code ec;
fs::create_directories(to.parent_path());

std::error_code ec;
fs::rename(*this, to, ec);
if (ec == std::errc::cross_device_link) {
fs::copy(*this, to, copy_options, ec);
Expand Down

0 comments on commit 2e4d2e3

Please sign in to comment.