options: more compatible current dir getter. Fixes #136

This commit is contained in:
Kaian 2016-08-09 14:12:36 +02:00
parent 07797cc61e
commit 7c56e4ebbb
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}