Changeset 11785


Ignore:
Timestamp:
Jan 30, 2011, 1:33:53 AM (10 years ago)
Author:
jordan
Message:

(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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r11709 r11785  
    370370}
    371371
     372/**
     373 * This function is for transmission-gtk users to migrate the config files
     374 * from $HOME/.transmission/ (where they were kept before Transmission 1.30)
     375 * to $HOME/.config/$appname as per the XDG directory spec.
     376 */
    372377static void
    373378migrateFiles( const tr_session * session )
    374379{
    375380    static int migrated = FALSE;
    376 
    377     if( !migrated )
     381    const tr_bool should_migrate = strstr( getOldConfigDir(), ".transmission" ) != NULL;
     382
     383    if( !migrated && should_migrate )
    378384    {
    379385        const char * oldDir;
Note: See TracChangeset for help on using the changeset viewer.