From 69d99f252f41ae77fba3eccdec409dda12d7ce16 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 30 Jan 2011 01:33:53 +0000 Subject: [PATCH] (trunk libT) #2363 "daemon on mac moves config files on first launch" -- fixed. Don't run platform.c's migrateFiles() except on *nix platforms. Add comment explaining when the function is used and why. --- libtransmission/platform.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libtransmission/platform.c b/libtransmission/platform.c index 820d8c408..119d22f80 100644 --- a/libtransmission/platform.c +++ b/libtransmission/platform.c @@ -369,12 +369,18 @@ moveFiles( const char * oldDir, } } +/** + * This function is for transmission-gtk users to migrate the config files + * from $HOME/.transmission/ (where they were kept before Transmission 1.30) + * to $HOME/.config/$appname as per the XDG directory spec. + */ static void migrateFiles( const tr_session * session ) { static int migrated = FALSE; + const tr_bool should_migrate = strstr( getOldConfigDir(), ".transmission" ) != NULL; - if( !migrated ) + if( !migrated && should_migrate ) { const char * oldDir; const char * newDir; -- 2.40.0