]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
aft.c: Silence noisy warnings in com_add().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 24 Dec 2014 02:55:52 +0000 (02:55 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 14 Jun 2015 12:14:35 +0000 (14:14 +0200)
If the -a option to com_add() is not given, we ignore paths for which
guess_audio_format() returns negative. Currently the add command sends
a warning to the client for each skipped file, which may result in
very verbose output. This commit silences the warning.

aft.c

diff --git a/aft.c b/aft.c
index acf751566c61d82e23cc34565c1189f2db147917..4893f215b8a46cd9c18d0b03e0262b1ff68f72df 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1876,8 +1876,10 @@ static int add_one_audio_file(const char *path, void *private_data)
        unsigned char hash[HASH_SIZE];
 
        ret = guess_audio_format(path);
-       if (ret < 0 && !(pad->flags & ADD_FLAG_ALL))
+       if (ret < 0 && !(pad->flags & ADD_FLAG_ALL)) {
+               ret = 0;
                goto out_free;
+       }
        query.data = (char *)path;
        query.size = strlen(path) + 1;
        ret = send_callback_request(path_brother_callback, &query,