history: fix the check for an existing $HOME/.nano/ directory

This fixes https://savannah.gnu.org/bugs/?52339.
This commit is contained in:
David Lawrence Ramsey 2017-11-05 12:06:03 -06:00 committed by Benno Schulenberg
parent c16e79b612
commit 7d653e5a17
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ bool have_statedir(void)
if (homedir != NULL) {
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;
}