diff --git a/src/history.c b/src/history.c index d56cc761..5ee5091f 100644 --- a/src/history.c +++ b/src/history.c @@ -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; }