Load config from %LOCALAPPDATA%\redshift.conf on Windows

This commit is contained in:
TingPing
2013-12-29 14:46:17 -05:00
parent dc9fcec70c
commit bf14e7bd12
+2 -2
View File
@@ -50,9 +50,9 @@ open_config_file(const char *filepath)
snprintf(cp, sizeof(cp), "%s/redshift.conf", env);
filepath = cp;
#ifdef _WIN32
} else if ((env = getenv("userprofile")) != NULL && env[0] != '\0') {
} else if ((env = getenv("localappdata")) != NULL && env[0] != '\0') {
snprintf(cp, sizeof(cp),
"%s/.config/redshift.conf", env);
"%s\\redshift.conf", env);
filepath = cp;
#endif
} else if ((env = getenv("HOME")) != NULL && env[0] != '\0') {