summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2013-09-12 18:26:14 +0200
committerwm4 <wm4@nowhere>2013-09-13 22:00:33 +0200
commit95abd6b82a4f75f1700ce61b1ffc14f7a3f9d4e9 (patch)
tree39d17d93c37d37e08a4819ce70f1dc3bb7a3437b
parenteb02fdde90c6a5d4eccb48b5a66a6ad9f40cd408 (diff)
downloadmpv-95abd6b82a4f75f1700ce61b1ffc14f7a3f9d4e9.tar.bz2
mpv-95abd6b82a4f75f1700ce61b1ffc14f7a3f9d4e9.tar.xz
mpvcore/path: Fix non-MinGW builds
Well that was dumb.
-rw-r--r--mpvcore/path.c7
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;