forked from Mirrors/sngrep
options: more compatible current dir getter. Fixes #136
This commit is contained in:
parent
07797cc61e
commit
7c56e4ebbb
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue