diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2008-12-13 10:54:13 +0100 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2008-12-13 10:54:13 +0100 |
commit | 64677e82098a4aaba82d26a2d73481d3fe912440 (patch) | |
tree | c7c0ec751189a748524a471cb42ea30295663a5a | |
parent | 59a9ee3646aa7ca6daf360dfde771ac865a74054 (diff) | |
download | exilog-64677e82098a4aaba82d26a2d73481d3fe912440.zip exilog-64677e82098a4aaba82d26a2d73481d3fe912440.tar.gz exilog-64677e82098a4aaba82d26a2d73481d3fe912440.tar.bz2 |
automatically add trailing slash to webroot config option if missing, resolves #129
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
-rw-r--r-- | lib/exilog_config.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/exilog_config.pm b/lib/exilog_config.pm index bd24b1c..577812d 100644 --- a/lib/exilog_config.pm +++ b/lib/exilog_config.pm @@ -66,6 +66,11 @@ if ( ! -r $cfg_file ) { $config = _read_ph($cfg_file); +# check if user forgots to add a trailing slash - if so, add it here +if ( $config->{web}->{webroot} !~ /\/$/ ) { + $config->{web}->{webroot}.="/"; +} + unless ($config) { print STDERR "($$) [exilog_config] Can't parse configuration file.\n"; exit(0); |