You are here

[Fixed] Audacity: Temp directory location not saved

8 posts / 0 new
Last post
shadowlmd
Offline
Last seen: 2 years 7 months ago
Joined: 2012-02-18 11:42
[Fixed] Audacity: Temp directory location not saved

Audacity ignores user-specified temp directory location and resets it every time it started. While it's a good idea to have it inside %TEMP% by default, user preference should be respected and saved properly.

John T. Haller
John T. Haller's picture
Online
Last seen: 18 min 15 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Need?

As Audacity's TEMP directory actually has to be manually set on each launch for it to properly handle switching PCs, that's why it is reset. Is there any need to manually specify a directory? Especially since if you set it on another drive, it'll break as soon as you move PCs anyway. Are you trying to put TEMP files on your portable drive?

Sometimes, the impossible can become possible, if you're awesome!

shadowlmd
Offline
Last seen: 2 years 7 months ago
Joined: 2012-02-18 11:42
It could reset only when path

It could reset only when path is invalid. I have a very fast external drive and would like to keep Audacity's temp on it instead of slow laptop drive.

John T. Haller
John T. Haller's picture
Online
Last seen: 18 min 15 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Platform?

Do you use the platform? If so, setting a self-contained TEMP directory will be debuting shortly for all apps. If not, it'll require custom coding to accomplish this. And there may be instances when the path is valid but not desired (if a given PC has the same account name as the last PC you used but you are using a different account), so it wouldn't be as simple as a simple check if the path is valid.

Sometimes, the impossible can become possible, if you're awesome!

shadowlmd
Offline
Last seen: 2 years 7 months ago
Joined: 2012-02-18 11:42
I'm using platform. As for

I'm using platform.

As for path validation, you can do something like that:

On options save:
If temp_path == "%TEMP%\Audacity" then options.temp_path = 'DEFAULT'

On options read:
If options.temp_path == 'DEFAULT' or !dir_exists(options.temp_path) then temp_path = "%TEMP%\Audacity"

With this, default path will never get saved in options literally, which will reduce chances of said situation to extremally low.

John T. Haller
John T. Haller's picture
Online
Last seen: 18 min 15 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Added in 2.0 Rev 2

I added some custom code to handle this in 2.0 Rev 2. It should work as expected now.

Sometimes, the impossible can become possible, if you're awesome!

xgolemx
Offline
Last seen: 11 years 8 months ago
Joined: 2012-07-07 04:36
using 2.0.1 rev2 and

using 2.0.1 rev2 and directory location is still not beeing saved. any hints how to change it?

John T. Haller
John T. Haller's picture
Online
Last seen: 18 min 15 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Same Drive

A custom setting is only preserved on the same drive as the app. Otherwise it will be set to the system temp. This avoids a situation where setting it to a specific location and moving PCs results in a path that still exists but that you don't have rights to. But it still allows someone with a hard drive to be able to move around PCs with their TEMP on the drive freely.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments