summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-08-15 00:12:30 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-08-15 00:12:30 +0200
commit26d023b9e88cf633d2c4b6599941241054bf5fa0 (patch)
tree08a4e58a83f8cdb64a23499d4b5285844381764e
parent499382c2eb7b7d46b09157fd2367982db7202620 (diff)
downloadbin-26d023b9e88cf633d2c4b6599941241054bf5fa0.tar.gz
bin-26d023b9e88cf633d2c4b6599941241054bf5fa0.tar.xz
borg-restore.pl: Fix incorrect components_to_strip value
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xborg-restore.pl4
1 files changed, 1 insertions, 3 deletions
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));