files: include also the slash when re-adding the filename to the path
Otherwise a mistaken name gets recorded in the file-positions history.
Buglet existed since version 6.1, commit fdd946c0.
This commit is contained in:
@@ -1419,8 +1419,9 @@ char *get_full_path(const char *origpath)
|
||||
|
||||
/* Upon success, re-add the last component of the original path. */
|
||||
if (target) {
|
||||
target = nrealloc(target, strlen(target) + strlen(slash + 1) + 1);
|
||||
strcat(target, slash + 1);
|
||||
*slash = '/';
|
||||
target = nrealloc(target, strlen(target) + strlen(slash) + 1);
|
||||
strcat(target, slash);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user