29 if (
gPrefs && path.empty())
32 FileNames::PathType::_None), wxT(
""));
38 XO(
"The temporary files directory is on a FAT formatted drive.\n"
39 "Resetting to default location."),
40 "Error:_Unsuitable_drive"
76 tmpFile.AssignTempFileName(wxT(
"nn"));
78 wxString
BadPath = tmpFile.GetLongPath();
79 ::wxRemoveFile(tmpFile.GetFullPath());
86 if( Name.Contains(
"/tmp/") )
89 wxFileName cmpFile( Name );
90 wxString NameCanonical = cmpFile.GetLongPath( ) +
"/";
93 wxFileName cmpFile( Name );
94 wxString NameCanonical = cmpFile.GetLongPath( ) +
"\\";
98 XO(
"The temporary files directory is on a FAT formatted drive.\n"
99 "Resetting to default location.")))
104 return !(NameCanonical.StartsWith(
BadPath ));
112 return fn.GetFullPath();
122 XO(
"%s\n\nFor tips on suitable drives, click the help button.").
Format(msg),
123 "Error:_Unsuitable_drive"
Toolkit-neutral facade for basic user interface services.
static wxString & TempDirPath()
static FilePath sDefaultTempDir
Default temp directory.
Subclasses may hold information such as a parent window pointer for a dialog.
Holds a msgid for the translation catalog; may also bind format arguments.
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()
void BadPath(const TranslatableString &format, const wxString &key, const Identifier &name)