aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2013-12-29 19:03:28 -0800
committerJon Lund Steffensen <jonlst@gmail.com>2013-12-29 19:03:28 -0800
commit87c736f39f987d68cc265073393118e1d2a0f75a (patch)
tree8a54251eed15bfb507f28177dac69befa475bd81
parentMerge pull request #20 from TingPing/patch-2 (diff)
parentLoad config from %LOCALAPPDATA%\redshift.conf on Windows (diff)
downloadredshift-ng-87c736f39f987d68cc265073393118e1d2a0f75a.tar.gz
redshift-ng-87c736f39f987d68cc265073393118e1d2a0f75a.tar.bz2
redshift-ng-87c736f39f987d68cc265073393118e1d2a0f75a.tar.xz
Merge pull request #19 from TingPing/patch-1
Load config from %LOCALAPPDATA%\redshift.conf on Windows
-rw-r--r--src/config-ini.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config-ini.c b/src/config-ini.c
index eae19c7..4541a0f 100644
--- a/src/config-ini.c
+++ b/src/config-ini.c
@@ -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') {