1 | --- libtransmission/platform.c.orig 2009-06-19 10:53:49.000000000 -0500 |
---|
2 | +++ libtransmission/platform.c 2009-06-19 10:55:52.000000000 -0500 |
---|
3 | @@ -232,22 +232,17 @@ |
---|
4 | |
---|
5 | if( !home ) |
---|
6 | { |
---|
7 | - home = tr_strdup( getenv( "HOME" ) ); |
---|
8 | - |
---|
9 | - if( !home ) |
---|
10 | - { |
---|
11 | #ifdef WIN32 |
---|
12 | - char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */ |
---|
13 | - *appdata = '\0'; |
---|
14 | - SHGetFolderPath( NULL, CSIDL_PERSONAL, NULL, 0, appdata ); |
---|
15 | - home = tr_strdup( appdata ); |
---|
16 | + char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */ |
---|
17 | + *appdata = '\0'; |
---|
18 | + SHGetFolderPath( NULL, CSIDL_PERSONAL, NULL, 0, appdata ); |
---|
19 | + home = tr_strdup( appdata ); |
---|
20 | #else |
---|
21 | - struct passwd * pw = getpwuid( getuid( ) ); |
---|
22 | - if( pw ) |
---|
23 | - home = tr_strdup( pw->pw_dir ); |
---|
24 | - endpwent( ); |
---|
25 | + struct passwd * pw = getpwuid( getuid( ) ); |
---|
26 | + if( pw ) |
---|
27 | + home = tr_strdup( pw->pw_dir ); |
---|
28 | + endpwent( ); |
---|
29 | #endif |
---|
30 | - } |
---|
31 | |
---|
32 | if( !home ) |
---|
33 | home = tr_strdup( "" ); |
---|