Did F-Spot eat your photos?

11.06.2010 10:32

F-Spot has this weird feature. Sometimes when you import a photograph it doesn't copy the actual file to its library but only makes a reference to the file's current location in its database. And yes, I know about the "Copy files" checkbox in the Import dialog.

I don't know about you, but the library is the most important reason I use F-Spot instead of my old unwieldy sort-files-into-directories-manually system.

I have yet to discover when this happens, but when it does, it is easy to miss it. The thumbnail for the image appears normally and there is no indication in the GUI of where the image is actually stored. It's only when you open the image in full view and the original files have been moved (or worse, deleted) that the first sign of trouble appears.

On two occasions now I have stumbled upon old images missing from the library. On one of them I was able to recover some of the lost images from a wiped SD card using some tool which name I can't remember now (possibly either recoverjpeg or PhotoRec).

Here's how to check if any photo in F-Spot's database is located outside of the library:

$ sqlite3 $HOME/.config/f-spot/photos.db
sqlite> select * from photos where base_uri not like "file:///home/avian/images/Library%";

Of course, replace the path in the query with the path where your photo library lives.

If the SQL query returns any rows (like in the real-life example above) all you can do is curse the F-Spot developers and hope those images are still in Recycle bin or non-reused portion of some memory card.

Posted by Tomaž | Categories: Code


Yikes, so glad that this check returned 0 rowsin my personal collection, scary stuff. Good luck on hunting this one down. Will keep an eye out too.

Add a new comment

(No HTML tags allowed. Separate paragraphs with a blank line.)