summaryrefslogtreecommitdiffstats
path: root/restore.pl
diff options
context:
space:
mode:
Diffstat (limited to 'restore.pl')
-rwxr-xr-xrestore.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/restore.pl b/restore.pl
index 5e7214c..d553f06 100755
--- a/restore.pl
+++ b/restore.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#----------------------------------------------------
-# Version: 0.1.0
+# Version: 0.1.1
# Author: Florian "Bluewind" Pritz <flo@xssn.at>
#
# Licensed under WTFPL v2
@@ -69,7 +69,7 @@ for my $filename (@ARGV) {
print "\e[0;34mEnter ID to restore (Enter to skip): \e[0m";
my $id = <STDIN>;
chomp $id;
- next unless ($id =~ /^\d+$/);
+ next unless (exists ($filelist[$id]));
remove_tree $file if -d $file;
# need mtime preservation
#rcopy $filelist[$id]->{path}, $file;