com_add(): Return negative on errors
[paraslash.git] / 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)
-               para_printf(&msg, "%s\n", para_strerror(-ret));
+               para_printf(&msg, "could not add %s\n", path);
        flush_and_free_pb(&msg);
-       return 0;
+       return ret;
 }
 
 /** Used by com_add(). */