map

minimalist audio player
git clone https://porkepik.fr/map
Log | Files | Refs | README | LICENSE

commit 0e834f08246f5eecc77413b8889271043a128c34
parent fb77c4976fc9bcaab33af6d7273a87dd0926bdc5
Author: Thomas Philippe <dev@porkepik.fr>
Date:   Tue, 27 Aug 2019 19:03:38 +0200

remove file type check

Diffstat:
Mmap.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/map.c b/map.c @@ -230,8 +230,6 @@ get_tracks(const char *curdir) if (!(d = opendir(curdir))) return NULL; while ((dir = readdir(d))) { - if (dir->d_type != DT_REG) - continue; if (!strend(dir->d_name, ".flac") && !strend(dir->d_name, ".mp3") && !strend(dir->d_name, ".vorbis") && @@ -407,7 +405,7 @@ main(int argc, char **argv) player.curdir = "./"; struct track **tracks = get_tracks(player.curdir); - if (ntracks == 0) + if (ntracks == 0 || tracks == NULL) errx(1, "No audio files found in %s", player.curdir); qsort(tracks, ntracks, sizeof(*tracks), trackcmp);