From 05bde03de3552f7fbfd6d06c9414b349e0750ad1 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 19 Mar 2008 16:40:06 +0000 Subject: (init) simplify (pixel) git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@240104 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94 --- lib/MDV/Snapshot/Common.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') 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); -- cgit v1.2.1