history: fix the check for an existing $HOME/.nano/ directory
This fixes https://savannah.gnu.org/bugs/?52339.master
parent
c16e79b612
commit
7d653e5a17
|
@ -253,7 +253,7 @@ bool have_statedir(void)
|
||||||
if (homedir != NULL) {
|
if (homedir != NULL) {
|
||||||
statedir = concatenate(homedir, "/.nano/");
|
statedir = concatenate(homedir, "/.nano/");
|
||||||
|
|
||||||
if (stat(statedir, &dirstat) != 0 && S_ISDIR(dirstat.st_mode))
|
if (stat(statedir, &dirstat) == 0 && S_ISDIR(dirstat.st_mode))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue