Jonathan Woithe <jwoi...@physics.adelaide.edu.au> writes: >Since the initial thumbnail file is created after the image file the ctime >of the original thumbnail will always be later than the image file. So >testing for "thumbnail ctime older than image file" isn't going to work >reliably - this test will always be true even before any manipulations of >the image files is done.
>Unless you can force the ctime of the thumbnail to be that of the >associated image I can't see how a ctime test can be used - by definition >the thumbnail's ctime will always be "older" than the original image, so >the resulting test would always be true. Correct me if I'm wrong, but the ctime reflects changes to the file's inode, while mtime reflects changes to the actual file. Every time mtime changes, ctime is updated as well. But if we do some operations like changing the permission or renaming a file, then the ctime will be updated while the mtime will remain the same. I think geeqie is checking the mtime and sees when image files are rewritten, but it doesn't ever recognize when file names change. I'm a bit confused by your comments above. We start with an existing image file with a set mtime and ctime. Geeqie creates a thumbnail and this will have a newer (i.e., later) mtime and ctime. Now, so long as the thumbnail's ctime is newer than the image file everything is OK. If the image file is manipulated in any significant way, including rewriting its contents or renaming it, the ctime will be changed to "now" which will then make the existing thunbnail's ctime older than the image file. As soon as geeqie see that the thumbnail ctime is older than the image file's ctime, it should know that it needs to remake the thumbnail. When it does that, the thumbnail will once again have a newer ctime than the image file and everyone is happy once again. It seems straightforward to me, but possibly I'm missing something here. >[*] For example, note that "touch" can alter the access time or the > modification time. There's no mention in the manpage that it can > manipulate the ctime. That makes sense. There is no reason to update the ctime or mtime when using touch because nothing related to the file or it's inode have changed. Regards, -- C. Jeffery Small j...@cjsa.com ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel