mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Fix ZipFile func for linux
This commit is contained in:
@ -746,24 +746,8 @@ namespace ZLibZipUtils
|
|||||||
{
|
{
|
||||||
zipFile zf = zipOpenHelp(outputFile);
|
zipFile zf = zipOpenHelp(outputFile);
|
||||||
if (zf)
|
if (zf)
|
||||||
{
|
{
|
||||||
wstring inputFileName( inputFile );
|
wstring zipFileName = NSFile::GetFileName(inputFile);
|
||||||
|
|
||||||
wstring::size_type pos = 0;
|
|
||||||
static const wstring::size_type npos = -1;
|
|
||||||
|
|
||||||
pos = inputFileName.find_last_of( L'\\' );
|
|
||||||
|
|
||||||
wstring zipFileName;
|
|
||||||
|
|
||||||
if ( pos != npos )
|
|
||||||
{
|
|
||||||
zipFileName = wstring( ( inputFileName.begin() + pos + 1 ), inputFileName.end() );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
zipFileName = wstring( inputFileName.begin(), inputFileName.end() );
|
|
||||||
}
|
|
||||||
std::string zipFileNameA = codepage_issue_fixToOEM(zipFileName);
|
std::string zipFileNameA = codepage_issue_fixToOEM(zipFileName);
|
||||||
|
|
||||||
err = zipOpenNewFileInZip( zf, zipFileNameA.c_str(), &zinfo, NULL, 0, NULL, 0, NULL, method, compressionLevel );
|
err = zipOpenNewFileInZip( zf, zipFileNameA.c_str(), &zinfo, NULL, 0, NULL, 0, NULL, method, compressionLevel );
|
||||||
|
|||||||
Reference in New Issue
Block a user