diff options
Diffstat (limited to 'src/basic/dirent-util.c')
-rw-r--r-- | src/basic/dirent-util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/dirent-util.c b/src/basic/dirent-util.c index 59067121b7..6b9d26773e 100644 --- a/src/basic/dirent-util.c +++ b/src/basic/dirent-util.c @@ -70,5 +70,8 @@ bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) { if (de->d_name[0] == '.') return false; + if (!suffix) + return true; + return endswith(de->d_name, suffix); } |