Added handling of return value

This commit is contained in:
Robert Osfield
2016-06-30 11:03:40 +01:00
parent 509c0380fa
commit d4475e5b19

View File

@@ -197,7 +197,9 @@ typedef struct tm_unz_s
// some windows<->linux portability things
#ifdef ZIP_STD
DWORD GetFilePosU(HANDLE hfout)
{ struct stat st; fstat(FILENO(hfout),&st);
{
struct stat st;
if (fstat(FILENO(hfout),&st)<0) return 0xFFFFFFFF;
if ((st.st_mode&S_IFREG)==0) return 0xFFFFFFFF;
return ftell(hfout);
}