mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-27 12:01:29 +00:00
[DB Updates] Add Windows MySQL path auto detection for users where the path is not found (#2836)
This commit is contained in:
parent
839f31b24d
commit
25b4b97c41
@ -1199,6 +1199,25 @@ sub get_mysql_path
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($path eq "") {
|
||||
my @files;
|
||||
my $start_dir = trim(`echo %programfiles%`);
|
||||
find(
|
||||
sub {
|
||||
if ($#files > 0) {
|
||||
return;
|
||||
}
|
||||
push @files, $File::Find::name unless $File::Find::name!~/mysql.exe/i;
|
||||
},
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
if ($file=~/mysql.exe/i) {
|
||||
$path = $file;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($OS eq "Linux") {
|
||||
$path = `which mysql`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user