summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rwxr-xr-xbin/dthumb2
-rwxr-xr-xlib/App/Dthumb.pm6
3 files changed, 6 insertions, 3 deletions
diff --git a/Changelog b/Changelog
index 08580e4..08981ea 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,7 @@ git HEAD
* Show filename in lightbox
* The HTML title is now configurable, it defaults to the current directory
* Add -r/--recreate option to recreate all thumbnails
+ * Detect changed images via mtime
dthumb 0.1 - Sun Feb 27 2011
diff --git a/bin/dthumb b/bin/dthumb
index 05ea6fc..c9cded8 100755
--- a/bin/dthumb
+++ b/bin/dthumb
@@ -173,8 +173,6 @@ F<.dthumb>, which contains various data (so far icons and javascript code).
=head1 BUGS AND LIMITATIONS
-Thumbnails of changed images are not yet recreated.
-
Report issues either by mail to E<lt>derf@chaosdorf.deE<gt> or on
E<lt>http://github.com/derf/dthumb/issuesE<gt>.
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;
}