com_add(): Return negative on errors
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 5 Apr 2015 12:54:14 +0000 (12:54 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 12 Aug 2015 21:23:47 +0000 (23:23 +0200)
aft.c

diff --git a/aft.c b/aft.c
index 6b5e0b74c4e70edc6d75c3dfeec9f9594f942e7b..8573c20070a97e8a8237b611edede4014b04a74d 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1735,9 +1735,9 @@ static int com_add_callback(int fd, const struct osl_object *query)
        afs_event(AUDIO_FILE_ADD, &msg, aft_row);
 out:
        if (ret < 0)
        afs_event(AUDIO_FILE_ADD, &msg, aft_row);
 out:
        if (ret < 0)
-               para_printf(&msg, "%s\n", para_strerror(-ret));
+               para_printf(&msg, "could not add %s\n", path);
        flush_and_free_pb(&msg);
        flush_and_free_pb(&msg);
-       return 0;
+       return ret;
 }
 
 /** Used by com_add(). */
 }
 
 /** Used by com_add(). */