From c7a8b824a1f04ed1120d1ca1284332a5495b795b Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Mon, 11 Jan 2021 11:09:34 -0600 Subject: [PATCH] Reset temp directory if found to be on FAT drive --- src/FileNames.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/FileNames.cpp b/src/FileNames.cpp index 675f3af3e..14a775afa 100644 --- a/src/FileNames.cpp +++ b/src/FileNames.cpp @@ -662,6 +662,14 @@ bool FileNames::IsTempDirectoryNameOK( const FilePath & Name ) wxFileName cmpFile( Name ); wxString NameCanonical = cmpFile.GetLongPath( ) + "\\"; #endif + + if (FileNames::FATFilesystemDenied(NameCanonical, + XO("The temporary files direcotory is on a FAT formatted drive.\n" + "Resetting to default location."))) + { + return false; + } + return !(NameCanonical.StartsWith( BadPath )); }