summaryrefslogtreecommitdiffstats
path: root/restore.pl
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-11-28 19:02:43 +0100
committerFlorian Pritz <bluewind@xssn.at>2010-11-28 19:02:43 +0100
commitd5875bb024363599fae8f0c6bdc94c54cc9fe66f (patch)
tree3a95e71cd6d96b38d0c7b8e37402c5a6815c169b /restore.pl
parent1d2d26d415b4e86f6ebdabc7f2fe965235875db5 (diff)
downloadbin-d5875bb024363599fae8f0c6bdc94c54cc9fe66f.tar.gz
bin-d5875bb024363599fae8f0c6bdc94c54cc9fe66f.tar.xz
restore.pl: fix empty exists check when pressing enter
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'restore.pl')
-rwxr-xr-xrestore.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/restore.pl b/restore.pl
index 3d00026..1ca5f68 100755
--- a/restore.pl
+++ b/restore.pl
@@ -73,7 +73,7 @@ for my $filename (@ARGV) {
my $id = <STDIN>;
chomp $id;
chdir "/";
- next unless (exists ($filelist[$id]));
+ next unless ($id =~ /^\d+$/ && exists ($filelist[$id]));
remove_tree $file if -d $file;
# need mtime preservation
#rcopy $filelist[$id]->{path}, $file;