From 124b4c035ba2d3a15a09c3c62eef7226cb03aa2d Mon Sep 17 00:00:00 2001 From: Pan7 Date: Sun, 9 Aug 2015 15:40:41 +0200 Subject: [PATCH] Error description for file accesses that fail --- plugins/vfspk3/vfs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index 51c64cde..0654a656 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -114,9 +114,10 @@ static void vfsInitPakFile( const char *filename ){ guint32 i; int err; + errno = 0; uf = unzOpen( filename ); if ( uf == NULL ) { - g_FuncTable.m_pfnSysFPrintf( SYS_WRN, " failed to init pak file %s\n", filename ); + g_FuncTable.m_pfnSysFPrintf( SYS_WRN, " failed to init pak file %s. %s\n", filename, ( errno !=0 ? strerror( errno ): "" ) ); return; } g_FuncTable.m_pfnSysPrintf( " pak file: %s\n", filename );