[gthumb] fixed bug #606333, no importer thumbnails if camera clock inaccurate



commit 83192aa7c3f1caa6ad9366f4b51d9831e425f7ee
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Thu Jan 7 13:49:57 2010 -0500

    fixed bug #606333, no importer thumbnails if camera clock inaccurate

 gthumb/gth-file-list.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index 1ebfb8c..bd3457b 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -1273,9 +1273,13 @@ can_create_file_thumbnail (GthFileData *file_data,
 			   GTimeVal    *current_time,
 			   gboolean    *young_file_found)
 {
+	time_t   time_diff;
 	gboolean young_file;
 
-	young_file = (current_time->tv_sec - gth_file_data_get_mtime (file_data)) <= 1;
+	/* Check for files that are exactly 0 or 1 seconds old; they may still be changing. */
+	time_diff = current_time->tv_sec - gth_file_data_get_mtime (file_data);
+	young_file = (time_diff <= 1) && (time_diff >= 0);
+
 	if (young_file)
 		*young_file_found = TRUE;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]