diff --git a/ChangeLog b/ChangeLog index 7747efde..e69e31dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-01-26 Benno Schulenberg + * 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 * src/files.c (update_poshistory): Handle an update of the first element correctly. diff --git a/src/files.c b/src/files.c index 29e7ab6c..d9533d9d 100644 --- a/src/files.c +++ b/src/files.c @@ -3186,7 +3186,7 @@ void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos) 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. */