From 26d023b9e88cf633d2c4b6599941241054bf5fa0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 15 Aug 2016 00:12:30 +0200 Subject: borg-restore.pl: Fix incorrect components_to_strip value Signed-off-by: Florian Pritz --- borg-restore.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'borg-restore.pl') diff --git a/borg-restore.pl b/borg-restore.pl index 27dea1f..6477381 100755 --- a/borg-restore.pl +++ b/borg-restore.pl @@ -266,9 +266,7 @@ sub restore { printf "Restoring %s to %s from archive %s\n", $path, $destination, $archive->{archive}; my $basename = basename($path); - - # FIXME this returns incorrect results for /home vs /home/flo - my $components_to_strip =()= dirname("/".$path) =~ /\//g; + my $components_to_strip =()= $path =~ /\//g; debug(sprintf("CWD is %s", getcwd())); debug(sprintf("Changing CWD to %s", $destination)); -- cgit v1.2.3-24-g4f1b