Added handling of error value

This commit is contained in:
Robert Osfield 2016-06-30 11:24:50 +01:00
parent 4ed8558178
commit d2579c0702

View File

@ -4188,7 +4188,14 @@ void EnsureDirectory(const TCHAR *rootdir, const TCHAR *dir)
size_t len=_tcslen(rd);
if (len>0 && (rd[len-1]=='/' || rd[len-1]=='\\')) rd[len-1]=0;
#ifdef ZIP_STD
if (!FileExists(rd)) lumkdir(rd);
if (!FileExists(rd))
{
if (lumkdir(rd)<0)
{
// mkdir failed
return;
}
}
#else
if (!FileExists(rd)) CreateDirectory(rd,0);
#endif