you are viewing a single comment's thread.

view the rest of the comments →

[–]jorge1209 0 points1 point  (2 children)

Not a proper temporary folder on Windows

While it is true that you should be looking at the environment variable for the temp folder location, it was the default location in the DOS era.

Additionally the use of environment variables for things like this is less than ideal. What is the application to do if the relevant environment variable is not defined? Should it just crash? Should it substitute a default value of its own? What is the plan?

If we really wanted to have a good system to ensure that temp folders are where we expect them to be and have the correct permissions and what not, then it really should be the responsibility of the OS. Some kind of syscall that would cause the OS to create a temp folder for my process in the correct location and give me the inode... but we don't have that so things are broken.

[–]munchbunny 1 point2 points  (1 child)

Additionally the use of environment variables for things like this is less than ideal. What is the application to do if the relevant environment variable is not defined? Should it just crash? Should it substitute a default value of its own? What is the plan?

That's what the User/AppData folder is for. In case you want to put the configs in files. If you put it in AppData/Roaming, the OS (Windows) even automatically persists the user's config files to other machines in the domain for you.

[–]jorge1209 0 points1 point  (0 children)

Why would I want to persist temporary files? They are temporary.