mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
Add error handling on realpath() call.
(Without this, it happened for me that realpath() failed returning undef for the default vardir. This in turn caused mysql-test-run.pl to delete the source mysql-test/ directory.)
This commit is contained in:
parent
2deaa292e7
commit
734c4c0143
1 changed files with 6 additions and 1 deletions
|
|
@ -1475,7 +1475,12 @@ sub command_line_setup {
|
|||
{
|
||||
$default_vardir= "$glob_mysql_test_dir/var";
|
||||
}
|
||||
$default_vardir = realpath $default_vardir unless IS_WINDOWS;
|
||||
unless (IS_WINDOWS) {
|
||||
my $realpath = realpath($default_vardir);
|
||||
die "realpath('$default_vardir') failed: $!\n"
|
||||
unless defined($realpath) && $realpath ne '';
|
||||
$default_vardir = $realpath;
|
||||
}
|
||||
|
||||
if ( ! $opt_vardir )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue