Pref Migration Summary
rlaager at wiktel.com
Wed Apr 11 23:29:14 EDT 2007
Taking everything into account, I'm proposing a solution (in a
pseudo-code mix of C and sh) and look forward to feedback:
if ~/.purple does not exist or ~/.ppurple/migrating exists
if (~/.gaim exists)
# If this fails, we bail with an error and refuse to
# start Pidgin. The migrating file acts as a guard
# to ensure we only move forward if we completed a
# full migration.
cp ~/.gaim/<FILES> ~/.purple
if ~/.gaim/logs is a directory &&
symlink ~/.gaim/logs to ../.purple/logs
display error to user for manual intervention,
but allow Pidgin to load
On prefs load:
Modify Gaim prefs into purple/pidgin prefs as they're loaded.
In this way, preferences will be migrated in memory and will be written
to disk opportunistically. This technique also keeps things working if
someone renames .gaim to .purple before running Pidgin/Finch.
By moving the logs, we protect against the case where a user deletes
~/.gaim thinking it's no longer used and then loses all their logs.
However, we've protected against screwing with a symlink. By symlinking
~/.gaim/logs to .purple/logs, we ensure back and forth log
In the case of Windows, where we can't symlink the logs, I'd say we'll
just hope the user never goes back to Gaim. If they do, they'll just
have to deal manually.
How does this sound?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the Devel