3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-22 18:14:48 +01:00

PBot: strip trailing directory separator from directory command-line overrides

This commit is contained in:
Pragmatic Software 2020-05-29 18:57:22 -07:00
parent 159124cbe9
commit 75eac99ea1

View File

@ -75,6 +75,7 @@ sub initialize {
# check command-line arguments for directory overrides
my $override = $1;
my $value = $2;
$value =~ s/[\\\/]$//; # strip trailing directory separator
$data_dir = $value if $override eq 'data_dir';
$module_dir = $value if $override eq 'module_dir';
$plugin_dir = $value if $override eq 'plugin_dir';