[Crash] Fix filesystem crash / exception in DatabaseDumpService::RemoveCredentialsFile() (#4731)

This commit is contained in:
Chris Miles authored and GitHub committed 2025-03-01 19:51:41 -04:00
1 parent 20fe1926e0
commit a885bd9322
1 file changed
+6 -1
+6 -1
View File
@@ -596,7 +596,12 @@ void DatabaseDumpService::BuildCredentialsFile()
void DatabaseDumpService::RemoveCredentialsFile()
{
if (File::Exists(CREDENTIALS_FILE)) {
std::filesystem::remove(CREDENTIALS_FILE);
try {
std::filesystem::remove(CREDENTIALS_FILE);
}
catch (std::exception &e) {
LogError("std::filesystem::remove err [{}]", e.what());
}
}
}