diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-11 18:04:53 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-02-11 18:04:53 +0000 |
commit | 309766063aa4e3c873defe5c472ee53245168b9f (patch) | |
tree | b18b03313a00d21b7bd33ad41fba48cc73dc05b2 /src | |
parent | 30ed4f400f979adade61ca362377502464bee47a (diff) | |
parent | c280370fa3ef304b9adc9d3cf36c9aeec27034e4 (diff) | |
download | xine-lib-309766063aa4e3c873defe5c472ee53245168b9f.tar.gz xine-lib-309766063aa4e3c873defe5c472ee53245168b9f.tar.bz2 |
Merge from 1.1.
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-utils/utils.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index 8421b2374..c414f481f 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -358,22 +358,18 @@ const char *xine_get_homedir(void) { char *s; int len; - if (!homedir[0]) { - len = xine_strcpy_command(GetCommandLine(), homedir, sizeof(homedir)); - s = strdup(homedir); - GetFullPathName(s, sizeof(homedir), homedir, NULL); - free(s); - if ((s = strrchr(homedir, '\\'))) *s = '\0'; - } + len = xine_strcpy_command(GetCommandLine(), homedir, sizeof(homedir)); + s = strdup(homedir); + GetFullPathName(s, sizeof(homedir), homedir, NULL); + free(s); + if ((s = strrchr(homedir, '\\'))) + *s = '\0'; return homedir; #else struct passwd pwd, *pw = NULL; static char homedir[BUFSIZ] = {0,}; - if(homedir[0]) - return homedir; - #ifdef HAVE_GETPWUID_R if(getpwuid_r(getuid(), &pwd, homedir, sizeof(homedir), &pw) != 0 || pw == NULL) { #else |