htmlfile bug

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63948 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
Oleg.Korshul
2015-08-07 10:16:54 +00:00
committed by Alexander Trofimov
parent cf9d55e913
commit bf3b1c6f70

View File

@ -52,9 +52,9 @@ static std::wstring CorrectHtmlPath(const std::wstring& sPath)
{
wchar_t c = sPath.c_str()[0];
if (c == wchar_t('/'))
return L"file://" + sPath;
return L"file://" + sReturn;
}
return L"file:///" + sPath;
return L"file:///" + sReturn;
}
int CHtmlFile::Convert(const std::vector<std::wstring>& arFiles, const std::wstring& sDstfolder, const std::wstring& sPathInternal)
@ -81,12 +81,16 @@ int CHtmlFile::Convert(const std::vector<std::wstring>& arFiles, const std::wstr
// destination
oBuilder.WriteString(L"<destination>");
oBuilder.WriteEncodeXmlString(sDstfolder);
if (!sDstfolder.empty())
std::wstring sDstOut = sDstfolder;
NSStringExt::Replace(sDstOut, L"\\", L"/");
oBuilder.WriteEncodeXmlString(sDstOut);
if (!sDstOut.empty())
{
wchar_t _c = sDstfolder.c_str()[sDstfolder.length() - 1];
if (_c != '\\' && _c != '/')
wchar_t _c = sDstOut.c_str()[sDstOut.length() - 1];
if (_c != '/')
oBuilder.AddCharSafe('/');
}