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.
New: Kanri (Oct 09, 2024), Platform 29.5.3 (Jun 27, 2024)
1,100+ portable packages, 1.1 billion downloads
Please donate today
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.
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!
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.
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!
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.
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!
using 2.0.1 rev2 and directory location is still not beeing saved. any hints how to change it?
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!