From 717d7035f77b357908e886e70100ae0b59d1cdc7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 3 Mar 2011 21:32:37 +0100 Subject: Detect changed images via mtime --- lib/App/Dthumb.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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; } -- cgit v1.2.3