From bf3b1c6f708d42d8edde9a84ae33b7bb3e078cd3 Mon Sep 17 00:00:00 2001 From: "Oleg.Korshul" Date: Fri, 7 Aug 2015 10:16:54 +0000 Subject: [PATCH] htmlfile bug git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63948 954022d7-b5bf-4e40-9824-e11837661b57 --- HtmlFile/HtmlFile.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/HtmlFile/HtmlFile.cpp b/HtmlFile/HtmlFile.cpp index e85aa7c343..2d86d2f721 100644 --- a/HtmlFile/HtmlFile.cpp +++ b/HtmlFile/HtmlFile.cpp @@ -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& arFiles, const std::wstring& sDstfolder, const std::wstring& sPathInternal) @@ -81,12 +81,16 @@ int CHtmlFile::Convert(const std::vector& arFiles, const std::wstr // destination oBuilder.WriteString(L""); - 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('/'); }