Commit fdb7716a authored by Oleg Korshul's avatar Oleg Korshul

builder error (save to pdf & open file by url)

parent f72d6dfe
...@@ -97,7 +97,12 @@ public : ...@@ -97,7 +97,12 @@ public :
m_bComplete = (CURLE_OK == res); m_bComplete = (CURLE_OK == res);
if (m_bComplete) if (m_bComplete)
{
if (m_sFilePath.empty())
m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length()); 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); //int nRes = execl("/usr/bin/wget", stringWstingToUtf8String (m_sFileUrl).c_str(), "-P", stringWstingToUtf8String (m_sFilePath).c_str(), (char *)NULL);
//m_bComplete = nRes >= 0; //m_bComplete = nRes >= 0;
......
...@@ -70,7 +70,7 @@ public : ...@@ -70,7 +70,7 @@ public :
virtual int DownloadFile() virtual int DownloadFile()
{ {
CoInitialize ( NULL ); CoInitialize ( NULL );
if ( S_OK != _DownloadFile ( m_sFileUrl ) ) if ( /*S_OK != _DownloadFile ( m_sFileUrl )*/TRUE )
{ {
HRESULT hrResultAll = DownloadFileAll(m_sFileUrl, m_sFilePath); HRESULT hrResultAll = DownloadFileAll(m_sFileUrl, m_sFilePath);
......
...@@ -939,7 +939,7 @@ namespace NSDoctRenderer ...@@ -939,7 +939,7 @@ namespace NSDoctRenderer
MoveFileOpen(path, sFileCopy); MoveFileOpen(path, sFileCopy);
COfficeFileFormatChecker oChecker; COfficeFileFormatChecker oChecker;
if (!oChecker.isOfficeFile(path)) if (!oChecker.isOfficeFile(sFileCopy))
return false; return false;
if (oChecker.nFileType & AVS_OFFICESTUDIO_FILE_DOCUMENT) if (oChecker.nFileType & AVS_OFFICESTUDIO_FILE_DOCUMENT)
......
...@@ -1194,5 +1194,5 @@ bool Doct_renderer_SaveFile_ForBuilder(int nFormat, const std::wstring& strDstFi ...@@ -1194,5 +1194,5 @@ bool Doct_renderer_SaveFile_ForBuilder(int nFormat, const std::wstring& strDstFi
oParams.m_strDstFilePath = strDstFile; oParams.m_strDstFilePath = strDstFile;
return NSDoctRenderer::CDoctRenderer_Private::Doct_renderer_SaveFile(&oParams, 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);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment