mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 01:04:34 +08:00
builder error (save to pdf & open file by url)
This commit is contained in:
@ -97,7 +97,12 @@ public :
|
||||
|
||||
m_bComplete = (CURLE_OK == res);
|
||||
if (m_bComplete)
|
||||
m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length());
|
||||
{
|
||||
if (m_sFilePath.empty())
|
||||
m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length());
|
||||
else
|
||||
NSFile::CFileBinary::Move(UTF8_TO_U(sOut), m_sFilePath);
|
||||
}
|
||||
//int nRes = execl("/usr/bin/wget", stringWstingToUtf8String (m_sFileUrl).c_str(), "-P", stringWstingToUtf8String (m_sFilePath).c_str(), (char *)NULL);
|
||||
//m_bComplete = nRes >= 0;
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ public :
|
||||
virtual int DownloadFile()
|
||||
{
|
||||
CoInitialize ( NULL );
|
||||
if ( S_OK != _DownloadFile ( m_sFileUrl ) )
|
||||
if ( /*S_OK != _DownloadFile ( m_sFileUrl )*/TRUE )
|
||||
{
|
||||
HRESULT hrResultAll = DownloadFileAll(m_sFileUrl, m_sFilePath);
|
||||
|
||||
|
||||
@ -939,7 +939,7 @@ namespace NSDoctRenderer
|
||||
MoveFileOpen(path, sFileCopy);
|
||||
|
||||
COfficeFileFormatChecker oChecker;
|
||||
if (!oChecker.isOfficeFile(path))
|
||||
if (!oChecker.isOfficeFile(sFileCopy))
|
||||
return false;
|
||||
|
||||
if (oChecker.nFileType & AVS_OFFICESTUDIO_FILE_DOCUMENT)
|
||||
|
||||
@ -1194,5 +1194,5 @@ bool Doct_renderer_SaveFile_ForBuilder(int nFormat, const std::wstring& strDstFi
|
||||
oParams.m_strDstFilePath = strDstFile;
|
||||
|
||||
return NSDoctRenderer::CDoctRenderer_Private::Doct_renderer_SaveFile(&oParams,
|
||||
pNative, isolate, global_js, args, try_catch, strError, true);
|
||||
pNative, isolate, global_js, args, try_catch, strError, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user