Return the actual error from GetFileLength instead of 0.

This commit is contained in:
Reece H. Dunn
2017-02-04 16:03:56 +00:00
parent df6a2228b7
commit 3ce7fab7db
+1 -1
View File
@@ -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;