Skip to content

Commit

Permalink
fix: reports errors on failed file moves so no guessing on cause when…
Browse files Browse the repository at this point in the history
… its reported
  • Loading branch information
wired420 committed Feb 25, 2023
1 parent 1e89d45 commit c868081
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MQ2MeshManager.cpp
Expand Up @@ -329,7 +329,7 @@ int move_multiple_files(const fs::path& source, const fs::path& destination, con
if (move_single_file(p.path(), destination / p.path().filename()))
count++;
else
MeshWriteChat(fmt::format("Error moving file: {}", p.path().filename().string()), false);
MeshWriteChat(fmt::format("\arError moving file:\aw {} \a-r[\arError:\aw {}\a-r]", p.path().filename().string(), ec.message()), false);
}
}
}
Expand Down Expand Up @@ -522,12 +522,12 @@ void MeshDownloadFile(const std::string& url, const std::string& filename, const
if (move_single_file(fs::path(_TmpPath), fs::path(FinalPath)))
MeshLoadDatabase();
else
MeshWriteChat(fmt::format("Error moving file: {}", filename), false);
MeshWriteChat(fmt::format("\arError moving file:\aw {} \a-r[\arError:\aw {}\a-r]", filename, ec.message()), false);
}
else if (filename.substr(filename.length() - 8, filename.length()) == ".navmesh")
{
if (!move_single_file(fs::path(_TmpPath), fs::path(FinalPath)))
MeshWriteChat(fmt::format("Error moving file {}", filename), false);
MeshWriteChat(fmt::format("\arError moving file:\aw {} \a-r[\arError:\aw {}\a-r]", filename, ec.message()), false);

}
}
Expand Down

0 comments on commit c868081

Please sign in to comment.