Added handling of error return value

This commit is contained in:
Robert Osfield 2016-06-30 11:26:21 +01:00
parent d2579c0702
commit 6cd944e9c3

View File

@ -4230,7 +4230,14 @@ void EnsureDirectory(const TCHAR *rootdir, const TCHAR *dir)
cd[MAX_PATH-1]=0;
#ifdef ZIP_STD
if (!FileExists(cd)) lumkdir(cd);
if (!FileExists(cd))
{
if (lumkdir(cd)<0)
{
// mkdir failed
return;
}
}
#else
if (!FileExists(cd))
{ CreateDirectory(cd,0);