[NTLUG:Discuss] original file creation date?

Eric Schnoebelen eric at cirr.com
Wed Sep 3 12:03:45 CDT 2008


Kenneth Loafman writes:
- Eric Schnoebelen wrote:
- > Which programs?  I'd like to take a look at their source, and
- > see what they are doing.
- 
- gnome-volume-manager-gthumb

I've dug through the source, and it's actually libgphoto2 that's
grabing the photos off the camera, and saving them to the local
disk.

Looking at the source (libgphoto2/gphoto2-file.c), in function
gp_file_save, utimes(2) is used to set mtime and atime (to the
mtime of the source file), but  nohting special is done to try
to set the ctime.

If libghoto2 is unable to get the sources last modification
time, it uses the current timestamp.

Therefore, it would appear that libgphoto2, and thus
gnome-volume-manager-gthumb work very hard to maintain the last
modification time on the file (which would be the time the photo
was taken, since it's coming directly off the camera), but is
unable to do anything about the inode creation time.

(hmm, libgphoto2 is pretty good code!  Far better than I had
expected, and, admittedly, the expectations were low.. :D)
-- 
Eric Schnoebelen		eric at cirr.com 		http://www.cirr.com
Geek Dictionary:
  Yuppie Food Stamps - The ubiquitous $20 bills spewed out of ATMs everywhere.  



More information about the Discuss mailing list