1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

Bug2602: Correct Windows case of IsOnFATFileSystem

This commit is contained in:
Paul Licameli
2020-12-06 12:25:47 -05:00
parent c5e454e109
commit d225d24092

View File

@@ -843,10 +843,14 @@ bool FileNames::IsOnFATFileSystem(const FilePath &path)
#include <fileapi.h>
bool FileNames::IsOnFATFileSystem(const FilePath &path)
{
wxFileNameWrapper fileName{path};
if (!fileName.HasVolume())
return false;
auto volume = fileName.GetVolume() + wxT(":\\");
DWORD volumeFlags;
wxChar volumeType[64];
if (!::GetVolumeInformation(
path.c_str(), NULL, 0, NULL, NULL,
if (!::GetVolumeInformationW(
volume.wc_str(), NULL, 0, NULL, NULL,
&volumeFlags,
volumeType,
WXSIZEOF(volumeType)))