Merge pull request #3781 from Dmitry-Me:dangerousStringManipulation
This commit is contained in:
commit
ebac739a35
@ -549,13 +549,9 @@ String tempfile( const char* suffix )
|
|||||||
#if defined WIN32 || defined _WIN32
|
#if defined WIN32 || defined _WIN32
|
||||||
#ifdef WINRT
|
#ifdef WINRT
|
||||||
RoInitialize(RO_INIT_MULTITHREADED);
|
RoInitialize(RO_INIT_MULTITHREADED);
|
||||||
std::wstring temp_dir = L"";
|
std::wstring temp_dir = GetTempPathWinRT();
|
||||||
const wchar_t* opencv_temp_dir = GetTempPathWinRT().c_str();
|
|
||||||
if (opencv_temp_dir)
|
|
||||||
temp_dir = std::wstring(opencv_temp_dir);
|
|
||||||
|
|
||||||
std::wstring temp_file;
|
std::wstring temp_file = GetTempFileNameWinRT(L"ocv");
|
||||||
temp_file = GetTempFileNameWinRT(L"ocv");
|
|
||||||
if (temp_file.empty())
|
if (temp_file.empty())
|
||||||
return String();
|
return String();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user