From 6d4179add38f41f609db21885e079145e4b5ea6a Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 24 Dec 2014 02:55:52 +0000 Subject: [PATCH] aft.c: Silence noisy warnings in com_add(). 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aft.c b/aft.c index acf75156..4893f215 100644 --- 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, -- 2.39.2