From 2c4ed8b31f441d6f5d8b6e4adf2d15c286429d04 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 10 Jun 2021 05:37:54 -0400 Subject: [PATCH] Bug2800: File>Open should allow non-project from a FAT drive... ... but still disallow it for .aup3 files. The fix is a simple moving of the check for a FAT filesystem after several other checks that distinguish types of imported files. --- src/ProjectFileManager.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index c32ff9956..6c339ea5f 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -870,13 +870,6 @@ AudacityProject *ProjectFileManager::OpenFile( const ProjectChooserFn &chooser, // convert these to long file name first. auto fileName = PlatformCompatibility::GetLongFileName(fileNameArg); - if (TempDirectory::FATFilesystemDenied(fileName, - XO("Project resides on FAT formatted drive.\n" - "Copy it to another drive to open it."))) - { - return nullptr; - } - // Make sure it isn't already open. // Vaughan, 2011-03-25: This was done previously in AudacityProject::OpenFiles() // and AudacityApp::MRUOpen(), but if you open an aup file by double-clicking it @@ -977,6 +970,15 @@ AudacityProject *ProjectFileManager::OpenFile( const ProjectChooserFn &chooser, } } + // Disallow opening of .aup3 project files from FAT drives, but only such + // files, not importable types. (Bug 2800) + if (TempDirectory::FATFilesystemDenied(fileName, + XO("Project resides on FAT formatted drive.\n" + "Copy it to another drive to open it."))) + { + return nullptr; + } + auto &project = chooser(true); return Get(project).OpenProjectFile(fileName, addtohistory); }