1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-06 14:27:36 +02:00

Bug 2576 - FAT formatted disks can readily run out of space with multiple edits - wrong error message can be displayed

This commit is contained in:
Leland Lucius
2021-01-05 01:32:03 -06:00
parent 8e333e1fae
commit 50f3321154
5 changed files with 111 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ used throughout Audacity into this one place.
#include "PlatformCompatibility.h"
#include "wxFileNameWrapper.h"
#include "widgets/AudacityMessageBox.h"
#include "widgets/ErrorDialog.h"
#include "widgets/FileDialog/FileDialog.h"
#if defined(__WXMAC__) || defined(__WXGTK__)
@@ -864,6 +865,23 @@ bool FileNames::IsOnFATFileSystem(const FilePath &path)
}
#endif
bool FileNames::FATFilesystemDenied( const FilePath &path, wxFrame *window /* = nullptr */ )
{
if (FileNames::IsOnFATFileSystem(path))
{
ShowErrorDialog(
window,
XO("Unsuitable"),
XO("FAT formatted filesystems are unsuitable."),
"Error:_Unsuitable_drive"
);
return true;
}
return false;
}
wxString FileNames::AbbreviatePath( const wxFileName &fileName )
{
wxString target;
@@ -884,3 +902,4 @@ wxString FileNames::AbbreviatePath( const wxFileName &fileName )
#endif
return target;
}