From 84c60beab650ce7f468844fb6bb36696e8541fd2 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sun, 3 Jan 2021 16:33:05 -0600 Subject: [PATCH] Bug 2603 - Backing up a >4GB project to a FAT drive fails with an incorrect misleading error message --- src/ProjectFileManager.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index 43dc21c14..37ed11fdc 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -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);