From 3ce7fab7db4c76d28ad7ddd6f2ffc9250cbd786c Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sat, 4 Feb 2017 16:03:56 +0000 Subject: [PATCH] Return the actual error from GetFileLength instead of 0. --- src/libespeak-ng/speech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libespeak-ng/speech.c b/src/libespeak-ng/speech.c index 9102a657..c916f864 100644 --- a/src/libespeak-ng/speech.c +++ b/src/libespeak-ng/speech.c @@ -281,7 +281,7 @@ int GetFileLength(const char *filename) struct stat statbuf; if (stat(filename, &statbuf) != 0) - return 0; + return -errno; if (S_ISDIR(statbuf.st_mode)) return -EISDIR;