Comment 17 for bug 354264

Revision history for this message
Martijn Vermaat (mvermaat) wrote :

Here's an attempt at a clean up strategy. Note that I don't have any incorrectly placed photos on this computer, so the following is all untested. You should only proceed if you understand what the commands are doing.

Move the relevant photos (probably in ~/2009) to the ~/Photos directory. Make sure you don't accidentally overwrite any existing photos or directories (go back and forth between the two directories, copying photos, in Nautilus for example). There's probably an easy automated command line solution for this, but I leave that to someone else (fiddle with 'find ~/2009', 'mkdir -p', and 'cp').

Now update the F-Spot database:

martijn@michelle:~$ sqlite3 .gnome2/f-spot/photos.db
SQLite version 3.6.10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> update photos set uri = replace(uri,'file:///home/martijn/2009/','file:///home/martijn/Photos/2009/');
sqlite> update photo_versions set uri = replace(uri,'file:///home/martijn/2009/','file:///home/martijn/Photos/2009/');
sqlite> .exit
martijn@michelle:~$

Of course, if you have a localized or customized location for ~/Photos, use that in the above instructions. And use your own home directory.

This can all be easily combined into a script that does some safety checks and reports back to the user on its results by whoever wants to sit down for it.