53 if (
gPrefs && path.empty())
56 FileNames::PathType::_None),
wxT(
""));
62 XO(
"The temporary files directory is on a FAT formatted drive.\n"
63 "Resetting to default location."),
64 "Error:_Unsuitable_drive"
101 tmpFile.AssignTempFileName(
wxT(
"nn"));
103 wxString
BadPath = tmpFile.GetLongPath();
104 ::wxRemoveFile(tmpFile.GetFullPath());
111 if( Name.Contains(
"/tmp/") )
114 wxFileName cmpFile( Name );
115 wxString NameCanonical = cmpFile.GetLongPath( ) +
"/";
118 wxFileName cmpFile( Name );
119 wxString NameCanonical = cmpFile.GetLongPath( ) +
"\\";
123 XO(
"The temporary files directory is on a FAT formatted drive.\n"
124 "Resetting to default location.")))
129 return !(NameCanonical.StartsWith(
BadPath ));
137 return fn.GetFullPath();
147 XO(
"%s\n\nFor tips on suitable drives, click the help button.").
Format(msg),
148 "Error:_Unsuitable_drive"
Toolkit-neutral facade for basic user interface services.
audacity::BasicSettings * gPrefs
static wxString & TempDirPath()
static FilePath sDefaultTempDir
Default temp directory.
Subclasses may hold information such as a parent window pointer for a dialog.
An object that sends messages to an open-ended list of subscribed callbacks.
Holds a msgid for the translation catalog; may also bind format arguments.
virtual bool Read(const wxString &key, bool *value) const =0
void ShowErrorDialog(const WindowPlacement &placement, const TranslatableString &dlogTitle, const TranslatableString &message, const ManualPageID &helpPage, const ErrorDialogOptions &options={})
Show an error dialog with a link to the manual for further help.
FILES_API bool IsOnFATFileSystem(const FilePath &path)
FILES_API wxString CreateUniqueName(const wxString &prefix, const wxString &suffix=wxEmptyString)
FILES_API wxString MkDir(const wxString &Str)
FILES_API wxString UnsavedProjectExtension()
FILES_API wxString PreferenceKey(FileNames::Operation op, FileNames::PathType type)
FILES_API void UpdateDefaultPath(Operation op, const FilePath &path)
FILES_API bool FATFilesystemDenied(const FilePath &path, const TranslatableString &msg, const BasicUI::WindowPlacement &placement={})
FILES_API wxString UnsavedProjectFileName()
FILES_API bool IsTempDirectoryNameOK(const FilePath &Name)
FILES_API wxString TempDir()
FILES_API void ResetTempDir()
FILES_API void SetDefaultTempDir(const FilePath &tempDir)
FILES_API const FilePath & DefaultTempDir()
FILES_API Observer::Publisher< FilePath > & GetTempPathObserver()
void BadPath(const TranslatableString &format, const wxString &key, const Identifier &name)
TempDirChangedPublisher & GetTempDirChangedPublisher()
void UpdateTempPath(const FilePath &path)