git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59093 954022d7-b5bf-4e40-9824-e11837661b57

This commit is contained in:
Elen.Subbotina
2014-10-22 08:26:45 +00:00
committed by Alexander Trofimov
parent 4afd1bf73e
commit 3f91a5ca8b
3 changed files with 22 additions and 5 deletions

View File

@ -16,12 +16,17 @@
CPPTXFile::CPPTXFile(load_from_resource fCallbackResource, extract_to_directory fCallbackExtract, compress_from_directory fCallbackCompress, progress_operation fCallbackProgress, void* pCallbackArg)
{
WCHAR buffer[4096];
GetTempPathW(4096, buffer);
m_strTempDir = CStringW(buffer);
GetLongPathNameW(m_strTempDir.GetString(), buffer, 4096);
m_strTempDir = CStringW(buffer) + CStringW("_PPTX\\");
#ifdef WIN32
WCHAR buffer[4096];
GetTempPathW(4096, buffer);
m_strTempDir = CStringW(buffer);
GetLongPathNameW(m_strTempDir.GetString(), buffer, 4096);
m_strTempDir = CStringW(buffer) + CStringW("_PPTX\\");
#else
m_strTempDir = FileSystem::Directory::GetTempPath();
m_strTempDir = FileSystem::Directory::GetLongPathNameW(m_strTempDir) + CString("_PPTX\\");
#endif
//
m_strFontDirectory = _T("");
m_strMediaDirectory = _T("");

View File

@ -119,4 +119,14 @@ namespace FileSystem {
return _T("");
return strFolderPath.substr(0,n1);
}
static CString GetLongPathNameW(const CString fileName)
{
return fileName;
}
static CString GetTempPath()
{
CString tempPath = P_tmpdir;
return tempPath;
}
}

View File

@ -33,5 +33,7 @@ namespace FileSystem {
static int GetFilesCount(const CString& path, const bool& recursive = false);
static CString GetFolderPath(const CString& path);
static CString GetLongPathNameW(const CString& fileName);
static CString GetTempPath();
};
}