mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
return error from abnormal zip (#237)
This commit is contained in:
@ -448,7 +448,10 @@ namespace ZLibZipUtils
|
|||||||
if (do_extract_currentfile(uf,&opt_extract_without_path,
|
if (do_extract_currentfile(uf,&opt_extract_without_path,
|
||||||
&opt_overwrite,
|
&opt_overwrite,
|
||||||
password) != UNZ_OK)
|
password) != UNZ_OK)
|
||||||
break;
|
{
|
||||||
|
err = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ( progress != NULL )
|
if ( progress != NULL )
|
||||||
{
|
{
|
||||||
@ -481,7 +484,7 @@ namespace ZLibZipUtils
|
|||||||
(*progress)( UTILS_ONPROGRESSEVENT_ID, progressValue, &cancel );
|
(*progress)( UTILS_ONPROGRESSEVENT_ID, progressValue, &cancel );
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*========================================================================================================*/
|
/*========================================================================================================*/
|
||||||
@ -841,9 +844,9 @@ int ZipDir( const WCHAR* dir, const WCHAR* outputFile, const OnProgressCallback*
|
|||||||
if ( buffer != NULL )
|
if ( buffer != NULL )
|
||||||
{
|
{
|
||||||
#if defined(_WIN32) || defined (_WIN64)
|
#if defined(_WIN32) || defined (_WIN64)
|
||||||
err = _wchdir( buffer );
|
int err1 = _wchdir( buffer );
|
||||||
#else
|
#else
|
||||||
err = chdir( buffer );
|
int err1 = chdir( buffer );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
free( buffer );
|
free( buffer );
|
||||||
|
|||||||
@ -147,9 +147,7 @@ namespace NExtractTools
|
|||||||
if (OfficeFileFormatChecker.nFileType == AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO)
|
if (OfficeFileFormatChecker.nFileType == AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO)
|
||||||
return mscrypt2oot_bin(sFrom, sTo, sTemp, params);
|
return mscrypt2oot_bin(sFrom, sTo, sTemp, params);
|
||||||
else
|
else
|
||||||
{
|
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||||
//вместо docx другой формат!!
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else return AVS_FILEUTILS_ERROR_CONVERT;
|
else return AVS_FILEUTILS_ERROR_CONVERT;
|
||||||
}
|
}
|
||||||
@ -559,7 +557,7 @@ namespace NExtractTools
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//вместо xlsx другой формат!!
|
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else return AVS_FILEUTILS_ERROR_CONVERT;
|
else return AVS_FILEUTILS_ERROR_CONVERT;
|
||||||
@ -938,7 +936,8 @@ namespace NExtractTools
|
|||||||
{
|
{
|
||||||
if (OfficeFileFormatChecker.nFileType == AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO)
|
if (OfficeFileFormatChecker.nFileType == AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO)
|
||||||
return mscrypt2oot_bin(sFrom, sTo, sTemp, params);
|
return mscrypt2oot_bin(sFrom, sTo, sTemp, params);
|
||||||
//вместо pptx другой формат!!
|
else
|
||||||
|
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||||
}
|
}
|
||||||
else return AVS_FILEUTILS_ERROR_CONVERT;
|
else return AVS_FILEUTILS_ERROR_CONVERT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user