sfm

simple file manager
git clone https://git.afify.dev/sfm.git
Log | Files | Refs | README | LICENSE

commit fc871502ae9225dfb70c1f5028bb9d819d3d101c
parent bb7d09f6490b876a1075ec11f5cac4e2b9d0cf30
Author: Christoph Polcin <coco@miconoco.de>
Date:   Thu, 14 Jul 2022 13:14:21 +0200

[feat] case insensitive extension matching

Diffstat:
Msfm.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/sfm.c b/sfm.c @@ -19,6 +19,7 @@ #include <sys/event.h> #endif +#include <ctype.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> @@ -473,6 +474,9 @@ get_ext(char *str) ext = ecalloc(MAX_EXT + 1, sizeof(char)); strncpy(ext, &str[len - counter], MAX_EXT); ext[MAX_EXT] = '\0'; + for(char *p=ext; *p; p++) { + *p=tolower(*p); + } return ext; }