Pin dir when visitng target file in find and list

This commit is contained in:
Arun Prakash Jana 2020-07-07 07:29:38 +05:30
parent 509f069818
commit 6fa4978230
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 4 additions and 0 deletions

View File

@ -5666,6 +5666,10 @@ nochange:
goto nochange;
}
/* Pin current directory */
free(mark);
mark = xstrdup(path);
cdprep(lastdir, NULL, path, newpath)
? (presel = FILTER) : (watch = TRUE);
xstrsncpy(lastname, pdents[cur].name, NAME_MAX + 1);