summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MDV/Snapshot/Common.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/MDV/Snapshot/Common.pm b/lib/MDV/Snapshot/Common.pm
index 3ef2d63..f041f66 100644
--- a/lib/MDV/Snapshot/Common.pm
+++ b/lib/MDV/Snapshot/Common.pm
@@ -34,8 +34,7 @@ our ($config_file, $backup_directory);
sub init {
$config_file = "$::prefix/etc/rsnapshot.conf";
- $backup_directory = "$::prefix/" .
- (split(/\s/, (find { /^snapshot_root\s/ } cat_($config_file)), 2))[1];
+ $backup_directory = (cat_($config_file) =~ /^snapshot_root\s(.*)/m) ? "$::prefix/$1" : '';
# normalize for glob():
chomp($backup_directory);