mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 01:11:43 +08:00
linux build ... reading ok
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59455 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
a3da7b9b48
commit
16decd0fa4
@ -193,7 +193,7 @@ namespace OOX
|
||||
|
||||
XmlUtils::CXmlNode oNode;
|
||||
|
||||
if ( oNode.FromXmlFile2( oFilePath.GetPath() ) && _T("Relationships") == oNode.GetName() )
|
||||
if ( oNode.FromXmlFile2( oRelsPath.GetPath() ) && _T("Relationships") == oNode.GetName() )
|
||||
{
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
if ( oNode.GetNodes( _T("Relationship"), oNodes ) )
|
||||
|
||||
@ -6,7 +6,7 @@ namespace FileSystem {
|
||||
std::wstring path_wstring;
|
||||
path_wstring = path;
|
||||
std::string path_string = stringWstingToUtf8String(path_wstring);
|
||||
return (-1 == access (path_string.c_str(), F_OK));
|
||||
return (0 == access (path_string.c_str(), F_OK));
|
||||
}
|
||||
bool File::Exists(const String& path) {
|
||||
return Exists(path.c_str());
|
||||
|
||||
@ -115,7 +115,10 @@ namespace OOX
|
||||
int nCurrentSlash = -1;
|
||||
int nCurrentW = 0;
|
||||
bool bIsUp = false;
|
||||
|
||||
#ifndef _WIN32
|
||||
if (pData[nCurrent] == (TCHAR)'/')
|
||||
pDataNorm[nCurrentW++] = (TCHAR) FILE_SEPARATOR_CHAR;
|
||||
#endif
|
||||
while (nCurrent < nLen)
|
||||
{
|
||||
if (pData[nCurrent] == (TCHAR) '\\' || pData[nCurrent] == (TCHAR)'/')
|
||||
|
||||
@ -236,7 +236,7 @@ namespace NSFile
|
||||
{
|
||||
if (NULL == pData)
|
||||
{
|
||||
pData = new BYTE[6 * lCount + 3 + 1];
|
||||
pData = new BYTE[6 * lCount + 3 + 1 + 64];
|
||||
}
|
||||
|
||||
BYTE* pCodesCur = pData;
|
||||
@ -443,8 +443,15 @@ namespace NSFile
|
||||
BYTE* pUtf8 = NULL;
|
||||
LONG lLen = 0;
|
||||
CUtf8Converter::GetUtf8StringFromUnicode(sFileName.c_str(), sFileName.length(), pUtf8, lLen, false);
|
||||
m_pFile = fopen((char*)pUtf8, "rb");
|
||||
delete [] pUtf8;
|
||||
m_pFile = fopen((char*)pUtf8, "rb");
|
||||
|
||||
if (NULL == m_pFile)
|
||||
{
|
||||
printf("Error: %s\n", strerror(errno));
|
||||
m_pFile = fopen((char*)sFileName.c_str(), "rb");
|
||||
}
|
||||
|
||||
delete [] pUtf8;
|
||||
#endif
|
||||
if (NULL == m_pFile)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user