aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarbenium <carbenium@outlook.com>2020-08-06 22:55:16 +0200
committerPeter Keresztes Schmidt <carbenium@outlook.com>2020-08-07 11:23:10 +0200
commit98b1b20d6beea5e2fdea7e404e8d880953d4b2fb (patch)
tree7f6fa0ab98ef3522325e3e8bd3c7fd836cc7c8ef
parent23886881b4c527d1b4b5a3de4f95855a62142edf (diff)
Core/Updater: Fix detection of the mysql binary when a directory is given as path
This ensures that we never pass a directory path StartProcess which results in a crash. Closes #25216
-rw-r--r--src/server/database/Updater/DBUpdater.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp
index ac75e64e9d3..bf283cf640f 100644
--- a/src/server/database/Updater/DBUpdater.cpp
+++ b/src/server/database/Updater/DBUpdater.cpp
@@ -40,10 +40,10 @@ std::string DBUpdaterUtil::GetCorrectedMySQLExecutable()
bool DBUpdaterUtil::CheckExecutable()
{
boost::filesystem::path exe(GetCorrectedMySQLExecutable());
- if (!exists(exe))
+ if (!is_regular_file(exe))
{
exe = Trinity::SearchExecutableInPath("mysql");
- if (!exe.empty() && exists(exe))
+ if (!exe.empty() && is_regular_file(exe))
{
// Correct the path to the cli
corrected_path() = absolute(exe).generic_string();