diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-08 02:30:31 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-08 02:30:31 +0200 |
| commit | 74ca76a58fca114140d0d0cc13a1216d6dffbee0 (patch) | |
| tree | 750209c29021d60451451132526c120c9ed137d0 /main.c | |
| parent | 8bff49d9c8c5842ee1a0cd423035dd53728bf11c (diff) | |
cftw: Allow directories to call the user callback
This provides a few benefits:
- This will allow searching for directories by name.
- Future commits will allow to remove files and directories, so this
change was also required for cftw.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -768,6 +768,9 @@ end: static int add_length(const char *const fpath, const struct stat *const sb, void *const user) { + if (!S_ISREG(sb->st_mode)) + return 0; + unsigned long long *const l = user; *l += sb->st_size; |
