--- a/bin/imager.save Wed Aug 17 12:10:51 2011 +0200
+++ b/bin/imager.save Wed Aug 17 16:16:23 2011 +0200
@@ -14,6 +14,7 @@
use Hash::Util qw(lock_keys);
use Getopt::Long;
use Pod::Usage;
+use Imager 0.1;
use constant KiB => 1024;
use constant MiB => 1024 * KiB;
@@ -154,14 +155,7 @@
push @{ $index{BLOCKS} }, sprintf "%12d %s %s" => ($. - 1),
$cs, $file;
- if (
- not( -e "$data/$file"
- or -e "$data/$file.gz"
- or -e "$data/$file.x"
- or -e "$data/$file.gz.x"
- or -e "$data/$file.x.gz")
- )
- {
+ if (not Imager::get_file("$data/$file")) {
mkpath dirname("$data/$file");
my $out = File::Temp->new(
TEMPLATE => "tmp-XXXXXXX",