From 08e16c00adff442e8a0e7ff6447f5dd6dc8f4df3 Mon Sep 17 00:00:00 2001 From: richardash1981 Date: Sat, 26 Nov 2011 17:21:52 +0000 Subject: [PATCH] Change the default location of the audacity temporary directory to be in /var/tmp not /tmp, so that files are not deleted on reboot by the OS automation, as suggested by several users on the mailing list. --- help/audacity.1 | 15 ++++++++++----- src/AudacityApp.cpp | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/help/audacity.1 b/help/audacity.1 index d0dd1db6e..e4c70000a 100644 --- a/help/audacity.1 +++ b/help/audacity.1 @@ -73,19 +73,24 @@ set the audacity block size for writing files to disk to nnn bytes Per user configuration file. .RE -.I /tmp/audacity\-/ +.I /var/tmp/audacity\-/ .RS Default location of Audacity's temp directory, where is your username. If this location is not suitable (not enough space in -/tmp, for example), you should change the temp directory in +/var/tmp, for example), you should change the temp directory in the Preferences and restart Audacity. Audacity is a disk-based editor, so the temp directory is very important: it should always -be on a fast disk with lots of free space. +be on a fast (local) disk with lots of free space. Note that older versions of Audacity put the temp directory inside of the user's home directory. This is undesirable on many systems, -and using some directory in /tmp is recommended. Open the Preferences -to check. +and using some directory in /tmp is recommended. + +On many modern Linux systems all files in /tmp/ will be deleted +each time the system boots up, which makes recovering a recording +that was going on when the system crashed much harder. This is why +the default is to use a directory in /var/tmp/ which will not +normally be deleted by the system. Open the Preferences to check. .RE .SH SEARCH PATH When looking for plug-ins, help files, localization files, or other diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 93f893301..209f3821a 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1045,14 +1045,14 @@ bool AudacityApp::OnInit() // AColor depends on theTheme. AColor::Init(); - /* On Unix systems, the default temp dir is in /tmp. */ /* Search path (for plug-ins, translations etc) is (in this order): * The AUDACITY_PATH environment variable * The current directory * The user's .audacity-files directory in their home directory * The "share" and "share/doc" directories in their install path */ #ifdef __WXGTK__ - defaultTempDir.Printf(wxT("/tmp/audacity-%s"), wxGetUserId().c_str()); + /* On Unix systems, the default temp dir is in /var/tmp. */ + defaultTempDir.Printf(wxT("/var/tmp/audacity-%s"), wxGetUserId().c_str()); wxString pathVar = wxGetenv(wxT("AUDACITY_PATH")); if (pathVar != wxT(""))