diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 96748e667185fc9d3d4cb47821d38baca4706401..f1b509c634c13ec675b844c543a40212c6ba397e 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -927,7 +927,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags,
 				}
 				if (!ast_test_flag(flags, OPTION_NAME) || res < 0) {
 					if (!ast_test_flag(flags, OPTION_NOTECH)) {
-						if (ast_fileexists(peer_name, NULL, NULL) != -1) {
+						if (ast_fileexists(peer_name, NULL, NULL) > 0) {
 							res = ast_streamfile(chan, peer_name, chan->language);
 							if (!res) {
 								res = ast_waitstream(chan, "");