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

This commit is contained in:
Chris Miles 2025-03-01 17:51:41 -06:00 committed by GitHub
parent 20fe1926e0
commit a885bd9322
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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());
}
}
}