[android][de] temp directory for Android

This commit is contained in:
Vladimir Gorshenkov
2019-10-03 18:01:00 +03:00
parent f97050a685
commit 01577278f0
3 changed files with 13 additions and 15 deletions

View File

@ -100,6 +100,9 @@
}
#endif
#ifndef __ANDROID_
std::string NSFile::CFileBinary::androidCahcePath = "";
#endif
namespace NSFile
{
std::wstring CUtf8Converter::GetUnicodeFromCharPtr(const char* pData, LONG lCount, INT bIsUtf8)
@ -1305,6 +1308,10 @@ namespace NSFile
if (NULL == folder)
folder = "/tmp";
#if defined (__ANDROID__)
folder = &androidCahcePath[0]; //we need extra char for NUL
#endif
return NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)folder, strlen(folder));
#endif
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -175,6 +175,10 @@ namespace NSFile
static std::wstring CreateTempFileWithUniqueName(const std::wstring& strFolderPathRoot, const std::wstring& Prefix);
static bool OpenTempFile(std::wstring *pwsName, FILE **ppFile, wchar_t *wsMode, wchar_t *wsExt, wchar_t *wsFolder, wchar_t* wsName = NULL);
static FILE* OpenFileNative(const std::wstring& sFileName, const std::wstring& sMode);
#ifndef __ANDROID_
static std::string androidCahcePath;
#endif
};
class KERNEL_DECL CBase64Converter