mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-17 16:50:26 +02:00
Bug 1220 - OS X: Audacity's temp dir defaults to location that is cleaned up on reboot
Untested on Mac (I don't have one). Might perhaps even fail to compile. But 1220 is a P1. Important enough for our schedule that we clear it now that I am happy enough to risk a 'blind patch'.
This commit is contained in:
parent
145a54d4a8
commit
eb32438907
@ -1260,10 +1260,19 @@ bool AudacityApp::OnInit()
|
||||
|
||||
#endif //__WXGTK__
|
||||
|
||||
// JKC Bug 1220: Use path based on home directory on WXMAC
|
||||
#ifdef __WXMAC__
|
||||
wxFileName tmpFile;
|
||||
tmpFile.AssignHomeDir();
|
||||
wxString tmpDirLoc = tmpFile.GetPath(wxPATH_GET_VOLUME);
|
||||
#else
|
||||
wxFileName tmpFile;
|
||||
tmpFile.AssignTempFileName(wxT("nn"));
|
||||
wxString tmpDirLoc = tmpFile.GetPath(wxPATH_GET_VOLUME);
|
||||
::wxRemoveFile(tmpFile.GetFullPath());
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// On Mac and Windows systems, use the directory which contains Audacity.
|
||||
#ifdef __WXMSW__
|
||||
@ -1291,9 +1300,14 @@ bool AudacityApp::OnInit()
|
||||
AddUniquePathToPathList(progPath + wxT("/../"), audacityPathList);
|
||||
AddUniquePathToPathList(progPath + wxT("/../Resources"), audacityPathList);
|
||||
|
||||
defaultTempDir.Printf(wxT("%s/audacity-%s"),
|
||||
tmpDirLoc.c_str(),
|
||||
wxGetUserId().c_str());
|
||||
// JKC Bug 1220: Using an actual temp directory for session data on Mac was
|
||||
// wrong because it would get cleared out on a reboot.
|
||||
defaultTempDir.Printf(wxT("%s/Library/Application/Support/audacity/SessionData"),
|
||||
tmpDirLoc.c_str());
|
||||
|
||||
//defaultTempDir.Printf(wxT("%s/audacity-%s"),
|
||||
// tmpDirLoc.c_str(),
|
||||
// wxGetUserId().c_str());
|
||||
#endif //__WXMAC__
|
||||
|
||||
// Define languanges for which we have translations, but that are not yet
|
||||
|
@ -148,7 +148,7 @@ void DirectoriesPrefs::OnChooseTempDir(wxCommandEvent & e)
|
||||
// already)
|
||||
wxString newDirName;
|
||||
#if defined(__WXMAC__)
|
||||
newDirName = wxT("audacity_temp");
|
||||
newDirName = wxT("SessionData");
|
||||
#elif defined(__WXMSW__)
|
||||
// Clearing Bug 1271 residual issue. Let's NOT have temp in the name.
|
||||
// [Arguably we should do this for all platforms, not just Windows
|
||||
|
Loading…
x
Reference in New Issue
Block a user