Re: [Nautilus-list] Re: Thumbnail sharing

On Friday, June 15, 2001, at 01:15  AM, Jens Finke wrote:

On Thu, 14 Jun 2001, Darin Adler wrote:
3) File dates. Nautilus makes the thumbnails have dates that match the
files they were generated from rather than the time they were generated.
That way, the code can compare the date on the file with the date on the
thumbnail for a (usually correct) check to see if the thumbnail needs to
be regenerated due to changes in the file.

Hm, where is this check? In libnautilus-private/nautilus-thumbnails.c it
does a simple check on the mtime of the two files. Why do you want to
store the creation time of the original image in the thumbnail? In which
cases could a simple image.mtime < thumb.mtime check fail?

Sure, if the image is modified and is newer than the thumbnail, all is well. But what about if an image is replaced by another image with the same name and an older mtime -- this comes up pretty often, for example if you make a change and the discard that file and replace it with an older image. An image.mtime < thumb.mtime will not detect that the "older image"
 is not the same one.

Looking at the Nautilus code, I see that it's only doing an image.mtime < thumb.mtime check, which is too bad. I didn't write the code, but rather advised Andy as he wrote it. And it seems that he didn't do it the way I suggested.

Something in the thumbnail has to identify the original image so that we don't end up with thumbnails that don't match their images. Ideally we'd want some kind of digest, say an MD5 signature, but the file system doesn' t provide that. Lacking that, we at least could use the file size and mtime. Lacking a place to store the file system, at least we can use the mtime. That was the theory anyway.

So anyway, it looks like the current Nautilus code doesn't do this the way I had suggested long ago. Sorry for the misunderstanding.

    -- Darin

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