Merge pull request #19 from TingPing/patch-1

Load config from %LOCALAPPDATA%\redshift.conf on Windows
This commit is contained in:
Jon Lund Steffensen
2013-12-29 19:03:28 -08:00
+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') {