diff --git a/src/bakatools/file_system/dir_entry.cpp b/src/bakatools/file_system/dir_entry.cpp index 2d54595..cf53e2f 100644 --- a/src/bakatools/file_system/dir_entry.cpp +++ b/src/bakatools/file_system/dir_entry.cpp @@ -57,12 +57,12 @@ namespace Bk return ent.hard_link_count(); } - bool DirEntry::move(std::string name) + bool DirEntry::move(std::string path) { - std::filesystem::directory_entry new_path(ent.path().parent_path()/name); + std::filesystem::directory_entry new_path(path); if (exists() && new_path.exists()) { - std::filesystem::rename(ent.path(), new_path.path()/name()); + std::filesystem::rename(ent.path(), new_path.path()); ent = std::filesystem::directory_entry(new_path.path()); return true; }