Makefile.in: switch from git-tar-tree to git-archive
[paraslash.git] / db.c
diff --git a/db.c b/db.c
index 9db622bca3ca6447fcc1659a0c270d49d2b36f60..8b06672606e50009004bd9dcf89625425295035b 100644 (file)
--- a/db.c
+++ b/db.c
@@ -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)
                        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;
                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;
                }
                                goto out;
                        continue;
                }