1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 07:39:42 +02:00

Detect temp dir FAT drive change while Audacity is active

This commit is contained in:
Leland Lucius 2021-01-11 13:12:59 -06:00
parent ac55e228ce
commit 98e00c92ad

View File

@ -213,6 +213,21 @@ wxString FileNames::TempDir()
if (gPrefs && path.empty())
path =
gPrefs->Read(PreferenceKey(Operation::Temp, PathType::_None), wxT(""));
if (IsOnFATFileSystem(path))
{
ShowErrorDialog(
nullptr,
XO("Unsuitable"),
XO("The temporary files direcotory is on a FAT formatted drive\n"
"Resetting to default location."),
"Error:_Unsuitable_drive"
);
path = DefaultTempDir();
UpdateDefaultPath(FileNames::Operation::Temp, path);
}
return FileNames::MkDir(path);
}