summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-03-03 21:32:37 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-03-03 21:32:37 +0100
commit717d7035f77b357908e886e70100ae0b59d1cdc7 (patch)
treee10e26ebd20556345f14c152ca0204434313ac16 /lib
parent866439d781c55a0fb1a0b3b7a92b7783a7a5dfc8 (diff)
Detect changed images via mtime
Diffstat (limited to 'lib')
-rwxr-xr-xlib/App/Dthumb.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm
index 7f9bb23..336e797 100755
--- a/lib/App/Dthumb.pm
+++ b/lib/App/Dthumb.pm
@@ -306,7 +306,11 @@ sub create_thumbnail_image {
my $thumbdir = $self->{config}->{dir_thumbs};
my $thumb_dim = $self->{config}->{size};
- if (-e "${thumbdir}/${file}" and not $self->{config}->{recreate}) {
+ if (
+ -e "${thumbdir}/${file}"
+ and not $self->{config}->{recreate}
+ and (stat($file))[9] <= (stat("${thumbdir}/${file}"))[9]
+ ) {
return;
}