Ignore:
Timestamp:
Oct 20, 2008, 7:34:19 PM (12 years ago)
Author:
charles
Message:

(libT) more win32 portability fixes from Spry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r6924 r6937  
    466466                              "Application Support", "Transmission", NULL );
    467467#elif defined( WIN32 )
    468             char configDir[MAX_PATH_LENGTH];
    469             GetModuleFileName( GetModuleHandle( NULL ), configDir, sizeof( configDir ) );
    470             s = tr_buildPath( basename( configDir ), "Transmission", NULL );
     468            char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
     469            SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, appdata );
     470            s = tr_buildPath( appdata, "Transmission", NULL );
    471471#else
    472472            if( ( s = getenv( "XDG_CONFIG_HOME" ) ) )
Note: See TracChangeset for help on using the changeset viewer.