This fixes Savannah bug #46971.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5592
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
+2016-01-26 Benno Schulenberg <bensberg@justemail.net>
+ * src/files.c (update_poshistory): Do not add directories to the
+ list of file positions. This fixes Savannah bug #46971.
+
2016-01-25 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (update_poshistory): Handle an update of the first
element correctly.
poshiststruct *posptr, *theone, *posprev = NULL;
char *fullpath = get_full_path(filename);
- if (fullpath == NULL)
+ if (fullpath == NULL || fullpath[strlen(fullpath) - 1] == '/')
return;
/* Look for a matching filename in the list. */