mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 16:09:28 +02:00
Merge pull request #211 from diddledan/patch-1
Use TMPDIR environment variable, if present.
This commit is contained in:
commit
965a74cd9e
@ -1291,8 +1291,15 @@ bool AudacityApp::OnInit()
|
||||
* The "share" and "share/doc" directories in their install path */
|
||||
wxString home = wxGetHomeDir();
|
||||
|
||||
/* On Unix systems, the default temp dir is in /var/tmp. */
|
||||
defaultTempDir.Printf(wxT("/var/tmp/audacity-%s"), wxGetUserId());
|
||||
wxString envTempDir = wxGetenv(wxT("TMPDIR"));
|
||||
if (envTempDir != wxT("")) {
|
||||
/* On Unix systems, the environment variable TMPDIR may point to
|
||||
an unusual path when /tmp and /var/tmp are not desirable. */
|
||||
defaultTempDir.Printf(wxT("%s/audacity-%s"), envTempDir, wxGetUserId());
|
||||
} else {
|
||||
/* On Unix systems, the default temp dir is in /var/tmp. */
|
||||
defaultTempDir.Printf(wxT("/var/tmp/audacity-%s"), wxGetUserId());
|
||||
}
|
||||
|
||||
// DA: Path env variable.
|
||||
#ifndef EXPERIMENTAL_DA
|
||||
|
Loading…
x
Reference in New Issue
Block a user