1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-05 08:33:53 +01:00

Bug 1271 - Move the Audacity temp dir to a location not scanned by cleanup apps (Residual)

The residual issue here was that an old cfg could go on using the unsafe path.  So we check for the unsafe path at init and silently substitute the good path.  If the user attempts to re-instate the unsafe path we tell them no, with an informative message.  This change was made more complex by windows allowing different strings for the same path, specifically C:\Users\JAMESC~1\AppData\Local\Temp\audacity_temp contains the shortening '~' so in the function that tests 'IsTempDirectoryNameOK' we use GetLongPath() to always compare the expanded names.

I also changed directory prefs to add SessionData rather than audacity_temp on the new directory name, on windows when choosing a new temp directory.
This commit is contained in:
James Crook
2015-12-26 14:56:47 +00:00
parent 0629c31538
commit 94afd8265b
3 changed files with 51 additions and 6 deletions

View File

@@ -181,6 +181,7 @@ class AudacityApp:public wxApp {
const wxArrayString & pathList,
wxArrayString &results,
int flags = wxDIR_FILES);
static bool IsTempDirectoryNameOK( const wxString & Name );
FileHistory *GetRecentFiles() {return mRecentFiles;}
void AddFileToHistory(const wxString & name);