Skip to content
Snippets Groups Projects
Commit c7d7c73d authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

More windows UTF16 path fixes to resolve random failures

parent c0178ea3
No related branches found
No related tags found
No related merge requests found
......@@ -144,11 +144,18 @@ LLOSInfo::LLOSInfo() :
#if LL_WINDOWS
if (IsWindowsVersionOrGreater(10, 0, 0))
if (IsWindows10OrGreater())
{
mMajorVer = 10;
mMinorVer = 0;
mOSStringSimple = "Microsoft Windows 10 ";
if (IsWindowsServer())
{
mOSStringSimple = "Windows Server ";
}
else
{
mOSStringSimple = "Microsoft Windows 10 ";
}
}
else if (IsWindows8Point1OrGreater())
{
......@@ -1316,7 +1323,14 @@ BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile)
LLFILE *dst = NULL;
S32 bytes = 0;
tmpfile = dstfile + ".t";
src = gzopen(srcfile.c_str(), "rb");
#if LL_WINDOWS
std::wstring utf16filename = ll_convert_string_to_wide(srcfile);
src = gzopen_w(utf16filename.c_str(), "rb");
#else
src = gzopen(srcfile.c_str(), "rb");/* Flawfinder: ignore */
#endif
if (! src) goto err;
dst = LLFile::fopen(tmpfile, "wb"); /* Flawfinder: ignore */
if (! dst) goto err;
......@@ -1350,7 +1364,14 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
LLFILE *src = NULL;
S32 bytes = 0;
tmpfile = dstfile + ".t";
dst = gzopen(tmpfile.c_str(), "wb"); /* Flawfinder: ignore */
#if LL_WINDOWS
std::wstring utf16filename = ll_convert_string_to_wide(tmpfile);
dst = gzopen_w(utf16filename.c_str(), "wb");
#else
dst = gzopen(tmpfile.c_str(), "wb");/* Flawfinder: ignore */
#endif
if (! dst) goto err;
src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */
if (! src) goto err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment