diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2013-09-12 18:26:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-13 22:04:47 +0200 |
commit | c472782c3e73fa7e41faec6de2cfcba6e6c28f13 (patch) | |
tree | ab83c97f5bce6bd1e0d1ffc788aa3795bbadc521 /mpvcore/path.c | |
parent | 601c285d833c526eba1e5aa9e84dc5b297fcf921 (diff) | |
download | mpv-c472782c3e73fa7e41faec6de2cfcba6e6c28f13.tar.bz2 mpv-c472782c3e73fa7e41faec6de2cfcba6e6c28f13.tar.xz |
mpvcore/path: Fix non-MinGW builds
Well that was dumb.
Diffstat (limited to 'mpvcore/path.c')
-rw-r--r-- | mpvcore/path.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mpvcore/path.c b/mpvcore/path.c index 6d7927e621..b7ea7e768c 100644 --- a/mpvcore/path.c +++ b/mpvcore/path.c @@ -78,9 +78,9 @@ char *mp_find_config_file(const char *filename) char *mp_find_user_config_file(const char *filename) { char *homedir = NULL, *buff = NULL; + static char *homepath = NULL; #ifdef __MINGW32__ char *config_dir = "mpv"; - static char *homepath = NULL; if (homepath == NULL) { char buf[MAX_PATH]; @@ -92,7 +92,10 @@ char *mp_find_user_config_file(const char *filename) } #else char *config_dir = ".mpv"; - static char *homepath = getenv("HOME"); + + if (homepath == NULL) { + homepath = getenv("HOME"); + } #endif #if defined(__MINGW32__) || defined(__CYGWIN__) char *temp = NULL; |