diff options
-rw-r--r-- | c_src/posix_to_bcachefs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/c_src/posix_to_bcachefs.c b/c_src/posix_to_bcachefs.c index 880ef531..3c2e72d8 100644 --- a/c_src/posix_to_bcachefs.c +++ b/c_src/posix_to_bcachefs.c @@ -319,7 +319,8 @@ static int dirent_cmp(const void *_l, const void *_r) const struct dirent *l = _l; const struct dirent *r = _r; - return strcmp(l->d_name, r->d_name); + return cmp_int(l->d_type, r->d_type) ?: + strcmp(l->d_name, r->d_name); } static void copy_dir(struct copy_fs_state *s, |