[Crash] Fix crash issue during database dump (#4127)

This commit is contained in:
Chris Miles authored and GitHub committed 2024-02-28 20:36:06 -05:00
1 parent 103a37e762
commit aa0ca88d9d
1 file changed
+6 -1
+6 -1
View File
@@ -575,7 +575,12 @@ void DatabaseDumpService::RemoveSqlBackup()
{
std::string file = fmt::format("{}.sql", GetDumpFileNameWithPath());
if (File::Exists(file)) {
std::filesystem::remove(file);
try {
std::filesystem::remove(file);
}
catch (std::exception &e) {
LogError("std::filesystem::remove err [{}]", e.what());
}
}
RemoveCredentialsFile();