Skip to content
Snippets Groups Projects
Commit 20e1fbce authored by Chris West (Faux)'s avatar Chris West (Faux) Committed by Yorhel
Browse files

chdir to the displayed directory

This isn't necessary for the actual operation of ncdu,
but helps tools like screen/tmux open a new terminal in the currently
viewed directory, which is what people probably expect.
parent 936a9446
No related branches found
No related tags found
No related merge requests found
......@@ -189,6 +189,10 @@ static void dirlist_fixup() {
void dirlist_open(struct dir *d) {
dirlist_par = d;
/* not necessary for any ncdu functionality,
* but enables screen/tmux to work out our cwd */
chdir(getpath(dirlist_par));
/* set the head of the list */
head_real = head = d == NULL ? NULL : d->sub;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment