aboutsummaryrefslogtreecommitdiff
path: root/src/rc/checkpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/checkpath.c')
-rw-r--r--src/rc/checkpath.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c
index b2d1dd23..bab22692 100644
--- a/src/rc/checkpath.c
+++ b/src/rc/checkpath.c
@@ -132,13 +132,14 @@ static int get_dirfd(char *path, bool symlinks)
*/
close(new_dirfd);
} else {
+ /* now walk down the directory path */
close(dirfd);
dirfd = new_dirfd;
free(linkpath);
linkpath = NULL;
+ item = strtok(NULL, "/");
+ components--;
}
- item = strtok(NULL, "/");
- components--;
}
free(path_dupe);
free(linkpath);