From: Andre Noll <maan@tuebingen.mpg.de>
Date: Sun, 5 Apr 2015 12:54:14 +0000 (+0000)
Subject: com_add(): Return negative on errors
X-Git-Tag: v0.5.6~94^2~25
X-Git-Url: https://git.tue.mpg.de/?a=commitdiff_plain;h=35c38a7ab419ea1b83e43b39d531ebb353f2d718;p=paraslash.git

com_add(): Return negative on errors
---

diff --git a/aft.c b/aft.c
index 6b5e0b74..8573c200 100644
--- 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(). */