diff options
-rwxr-xr-x | restore.pl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |