mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-25 20:54:32 +00:00
Use -EISDIR instead of -2 in GetFileLength for directories.
This commit is contained in:
@@ -78,6 +78,8 @@ static espeak_ng_STATUS ReadPhFile(void **ptr, const char *fname, int *size, esp
|
||||
|
||||
sprintf(buf, "%s%c%s", path_home, PATHSEP, fname);
|
||||
length = GetFileLength(buf);
|
||||
if (length < 0) // length == -errno
|
||||
return create_file_error_context(context, -length, buf);
|
||||
|
||||
if ((f_in = fopen(buf, "rb")) == NULL)
|
||||
return create_file_error_context(context, errno, buf);
|
||||
|
||||
Reference in New Issue
Block a user