From 7c56e4ebbb83c2e8d5000a0ca08e3d8064c2855b Mon Sep 17 00:00:00 2001 From: Kaian Date: Tue, 9 Aug 2016 14:12:36 +0200 Subject: [PATCH] options: more compatible current dir getter. Fixes #136 --- src/option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/option.c b/src/option.c index 87fe429..8c34d03 100644 --- a/src/option.c +++ b/src/option.c @@ -52,10 +52,10 @@ init_options() // Custom user conf file char userconf[128]; char *home = getenv("HOME"); - char *pwd = get_current_dir_name(); + char *pwd; // Defualt savepath is current directory - if (pwd) { + if ((pwd = getcwd(pwd, MAX_SETTING_LEN))) { setting_set_value(SETTING_SAVEPATH, pwd); free(pwd); }