1
1

ouch: set the positions-file name also when using the legacy state dir

One should test a change before pushing, also when it worked last time.
Этот коммит содержится в:
Benno Schulenberg 2017-11-08 21:11:57 +01:00
родитель ea47879911
Коммит 478e34a80c

Просмотреть файл

@ -257,8 +257,10 @@ 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)) {
poshistname = concatenate(statedir, POSITION_HISTORY);
return TRUE; return TRUE;
}
} }
free(statedir); free(statedir);
@ -289,9 +291,7 @@ bool have_statedir(void)
return FALSE; return FALSE;
} }
if (ISSET(POS_HISTORY)) poshistname = concatenate(statedir, POSITION_HISTORY);
poshistname = concatenate(statedir, POSITION_HISTORY);
return TRUE; return TRUE;
} }