X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=db.c;h=2e4ffbda74a7179d3c480c30f1df764e66b1c88d;hp=9db622bca3ca6447fcc1659a0c270d49d2b36f60;hb=65486c00c32defa2dab0a3166689d0b508ec806a;hpb=8b2c02c8d6255583982e767374d39375b3380c4d diff --git a/db.c b/db.c index 9db622bc..2e4ffbda 100644 --- a/db.c +++ b/db.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2006 Andre Noll + * Copyright (C) 2005-2007 Andre Noll * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ #include "server.cmdline.h" #include "server.h" -#include "afs.h" +#include "vss.h" #include /* readdir() */ #include /* stat */ #include /* mode_t */ @@ -75,14 +75,15 @@ int find_audio_files(const char *dirname, int (*f)(const char *, const char *)) continue; ret = -E_LSTAT; if (lstat(entry->d_name, &s) == -1) - goto out; + continue; m = s.st_mode; if (!S_ISREG(m) && !S_ISDIR(m)) /* skip links, sockets, ... */ continue; if (S_ISREG(m)) { /* regular file */ if (guess_audio_format(entry->d_name) < 0) continue; - if (f(dirname, entry->d_name) < 0) + ret = f(dirname, entry->d_name); + if (ret < 0) goto out; continue; }