From a8510331c0115eeee2d6ac0a4acbeb5d4df833b3 Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Sat, 26 Jan 2019 16:27:10 +0100 Subject: [PATCH] Fix compilation on UWP It appears that MSVC and Mingw disagree about what conversions are legal here. We just use the 'wide' version of the call and use our native CharType instead of TCHAR. --- drivers/windows/dir_access_windows.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index c32e0637364..8ac4e53c65e 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -354,13 +354,13 @@ String DirAccessWindows::get_filesystem_type() const { String unit = path.substr(0,unit_end+1) + "\\"; print_line("unit: "+unit); - TCHAR szVolumeName[100] = ""; - TCHAR szFileSystemName[10] = ""; + WCHAR szVolumeName[100]; + WCHAR szFileSystemName[10]; DWORD dwSerialNumber = 0; DWORD dwMaxFileNameLength = 0; DWORD dwFileSystemFlags = 0; - if(::GetVolumeInformation(unit.utf8().get_data(), + if(::GetVolumeInformationW(unit.c_str(), szVolumeName, sizeof(szVolumeName), &dwSerialNumber,