Merged PR 1317796: ExtractContentsSample don't create subdirectories approperly for non-Win platforms.

In the extract sample, for non-Win platforms, a file in a subdirectory will be saved as `Assets\contrast-black\SplashScreen.scale-100_contrast-black.png` instead of creating the proper directories

Related work items: #15487436
This commit is contained in:
Ruben Guerrero Samaniego 2018-01-17 02:06:16 +00:00
Родитель 42ee894e9a
Коммит 0593014cd3
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -7,6 +7,7 @@
#include <iomanip>
#include <functional>
#include <map>
#include <algorithm>
#ifdef WIN32
#define UNICODE
@ -270,6 +271,7 @@ HRESULT GetOutputStream(LPCWSTR path, LPCWSTR fileName, IStream** stream)
std::wstring fullFileName = path + std::wstring(L"\\") + fileName;
#else
std::wstring fullFileName = path + std::wstring(L"/") + fileName;
std::replace(fullFileName.begin(), fullFileName.end(), '\\', '/' );
#endif
hr = HRESULT_FROM_WIN32(mkdirp(fullFileName));