]> git.sesse.net Git - pr0n/commitdiff
In update-image-cache, do not fail silently on unlink.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 15 Jul 2020 18:12:28 +0000 (20:12 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 15 Jul 2020 18:12:28 +0000 (20:12 +0200)
perl/update-image-cache.pl

index f26ba99721a25224cc2664ddd8dca4ecfd78aa39..0ed6931bfe63ca4a2fcf648fa3e03202d765360b 100755 (executable)
@@ -118,7 +118,7 @@ while (my $ref = $q->fetchrow_hashref) {
                }
        }
        next unless $any_old;
-       unlink (@files);
+       unlink (@files) or die "Could not delete: $!";
        if (scalar @noboxres > 0) {
                Sesse::pr0n::Common::ensure_cached($r, $ref->{'filename'}, $id, $ref->{'width'}, $ref->{'height'}, sort_res(@noboxres));
        }