summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.c b/main.c
index f04f984..ca8c991 100644
--- a/main.c
+++ b/main.c
@@ -95,8 +95,15 @@ int main(int argc, char **argv) {
strbuf_printf(ted_local_data_dir, "%ls" PATH_SEPARATOR_STR "ted", appdata);
CoTaskMemFree(appdata);
}
+ id = FOLDERID_Profile;
+ wchar_t *home = NULL;
+ if (SHGetKnownFolderPath(&id, 0, NULL, &home) == S_OK) {
+ strbuf_printf(ted_home, "%ls", home);
+ CoTaskMemFree(home);
+ }
#else
char *home = getenv("HOME");
+ strbuf_printf(ted_home, "%s", home);
strbuf_printf(ted_local_data_dir, "%s/.local/share/ted", home);
#endif
}