Bug 2603 - Backing up a >4GB project to a FAT drive fails with an incorrect misleading error message

This commit is contained in:
Leland Lucius 2021-01-03 16:33:05 -06:00
parent 375a6a8803
commit 84c60beab6
1 changed files with 20 additions and 0 deletions

View File

@ -599,6 +599,26 @@ bool ProjectFileManager::SaveCopy(const FilePath &fileName /* = wxT("") */)
continue;
}
if (FileNames::IsOnFATFileSystem(filename.GetFullPath()))
{
if (wxFileName::GetSize(projectFileIO.GetFileName()) > UINT32_MAX)
{
ShowErrorDialog(
&window,
XO("Error Saving Project"),
XO("The project exceeds the maximum size of 4GB when writing to a FAT32 formatted filesystem."),
"Error:_Unsuitable_drive#fat32"
);
if (project.mBatchMode)
{
return false;
}
continue;
}
}
fName = filename.GetFullPath();
break;
} while (bPrompt);