Skip to content

Commit

Permalink
Fix bug that lead to leading slashes on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
cracauer authored and kevans91 committed Nov 16, 2023
1 parent 01edfe6 commit 516aba1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flist.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,10 @@ flist_gen_dirent(struct sess *sess, char *root, struct flist **fl, size_t *sz,
nxdev++;
}

/* This is for macOS fts, which returns "foo//bar" */
if (ent->fts_path[stripdir] == '/') {
stripdir++;
}
/* filter files */
if (rules_match(ent->fts_path + stripdir,
(ent->fts_info == FTS_D)) == -1) {
Expand Down

0 comments on commit 516aba1

Please sign in to comment.