Commit 59cc012d authored by Oleg Korshul's avatar Oleg Korshul

fix bug 32950

parent bfdafccc
...@@ -921,14 +921,10 @@ namespace NSDoctRenderer ...@@ -921,14 +921,10 @@ namespace NSDoctRenderer
NSStringUtils::CStringBuilder oBuilder; NSStringUtils::CStringBuilder oBuilder;
std::wstring _path = path; std::wstring _path = path;
std::wstring sDstFileDir = NSCommon::GetDirectoryName(_path); std::wstring sDstFileDir = NSCommon::GetDirectoryName(_path);
if (sDstFileDir.find(L"./") == 0) if ((sDstFileDir != _path) && !NSDirectory::Exists(sDstFileDir))
sDstFileDir = NSFile::GetProcessDirectory() + L"/" + sDstFileDir.substr(2);
if (!NSDirectory::Exists(sDstFileDir))
NSDirectory::CreateDirectories(sDstFileDir); NSDirectory::CreateDirectories(sDstFileDir);
_path = sDstFileDir + L"/" + NSCommon::GetFileName(path);
oBuilder.WriteString(L"<?xml version=\"1.0\" encoding=\"utf-8\"?><TaskQueueDataConvert><m_sFileFrom>"); oBuilder.WriteString(L"<?xml version=\"1.0\" encoding=\"utf-8\"?><TaskQueueDataConvert><m_sFileFrom>");
oBuilder.WriteEncodeXmlString(m_sFileDir); oBuilder.WriteEncodeXmlString(m_sFileDir);
oBuilder.WriteString(sFileBin + L"</m_sFileFrom><m_sFileTo>"); oBuilder.WriteString(sFileBin + L"</m_sFileFrom><m_sFileTo>");
......
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