modified DirEntry

main
anulax1225 ago%!(EXTRA string=1 year)
parent 6faef5c0b3
commit 5434ce9005
  1. 6
      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;
}

Loading…
Cancel
Save