From 5434ce9005950b248ebc705cfba8591f874bddf2 Mon Sep 17 00:00:00 2001 From: anulax1225 Date: Thu, 25 Apr 2024 09:49:07 +0200 Subject: [PATCH] modified DirEntry --- src/bakatools/file_system/dir_entry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; }