Bug 56862 - Nautilus doesn't detect invalid dates (future) on files
Nautilus doesn't detect invalid dates (future) on files
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: nautilus (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Havoc Pennington
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-28 20:44 EST by Doug Ledford
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-11 16:33:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Doug Ledford 2001-11-28 20:44:22 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6+) Gecko/20011121

Description of problem:
If you have pictures in a directory you are browsing with nautilus, and the
dates on those files are in the future, then nautilus will get in a loop of:

1) create new thumbnail
2) check date of thumbnail vs. picture
3) delete thumbnail
4) goto 1

If the date of the picture is in the future, then the thumbnail delete code
should *not* remove the thumbnail.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Use touch to change the time on a picture file
2. Set the time on the computer backwards
3. Try to get nautilus to bring up a thumbnail for the picture
	

Actual Results:  Nautilus loops

Expected Results:  Nautilus should create a new thumbnail, note that time
is still older on thumbnail than on picture (or note that picture's time is
invalid), and display the thumbnail it has.

Additional info:
Comment 1 Havoc Pennington 2002-03-11 16:33:32 EST
Index: nautilus-thumbnails.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-thumbnails.c,v
retrieving revision 1.31
diff -u -p -u -r1.31 nautilus-thumbnails.c
--- nautilus-thumbnails.c       25 Sep 2001 18:26:16 -0000      1.31
+++ nautilus-thumbnails.c       11 Mar 2002 21:30:29 -0000
@@ -242,6 +242,14 @@ first_file_more_recent (const char* file
 
        more_recent = file_info->mtime > other_file_info->mtime;
 
+       /* if a file has a modification time in the future, we don't
+        * want to thumbnail it over and over. This is kind of an
+        * underengineered solution but since this case isn't supposed
+        * to happen, it's perhaps appropriate.
+        */
+       if (file_info->mtime > time (NULL))
+               more_recent = FALSE;
+       
        gnome_vfs_file_info_unref (file_info);
        gnome_vfs_file_info_unref (other_file_info);
Comment 2 Havoc Pennington 2002-03-20 11:55:22 EST
nautilus-1.0.6-9 contains a more elaborate fix I did, that sets the thumbnail
timestamp to the same as the orig. file and redoes the thumbnail if the stamps
are not equal.

Note You need to log in before you can comment on or make changes to this bug.