1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

(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.
This commit is contained in:
Jordan Lee 2011-01-30 01:33:53 +00:00
parent e492bcf7d0
commit 69d99f252f

View file

@ -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;