Bug 2604 - Saving a 4 hour stereo chirp to FAT fails and with an inappropriate error message

This commit is contained in:
Leland Lucius 2021-01-03 16:02:43 -06:00
parent f60e197378
commit 375a6a8803
1 changed files with 14 additions and 0 deletions

View File

@ -299,6 +299,20 @@ bool ProjectFileManager::DoSave(const FilePath & fileName, const bool fromSaveAs
return false;
}
if (FileNames::IsOnFATFileSystem(fileName))
{
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"
);
return false;
}
}
bool success = projectFileIO.SaveProject(fileName, mLastSavedTracks.get());
if (!success)
{