Using the global directory is mostly fine on Windows (where it'll reside on a physical disk), but on Linux it usually sits in RAM. And if you happen to fill it up, the entire machine can deadlock.
Instead it'd be better to create an option for this (falling back to the global directory during early boot, before settings are loaded), defaulting to e.g. Bash Mod Data/Temp. This way a user can easily adjust it via settings.
Pros:
Avoids a potential deadlock on Linux (this isn't just hypothetical - extracting a mod that's 8GB+ unpacked would deadlock my system)
On Windows, a lot of people put their games outside C: (where %Temp% normally is), e.g. to G:. This means a BAIN installation proceeds as follows: extract to C: -> move to G:. Since these are separate devices, the data has to be physically copied from one to the other. If we have our temp dir on G: however, the move is on a single device - this is nearly instant on most filesystems and should make BAIN installations much faster.
Cons:
There's the potential that we might run out of space here if the installation would have overwritten some files in the game folder. But that problem already existed - we could also run out of space in the temp folder. A user who is running this low on space should really clean up or adjust the option to choose a less full drive for the temp folder.
Open Resolved Questions
[x] Where do we put the default?
Ideally on the same device as the game, otherwise we lose the second pro.
Yup
On Windows something like G:\.wbtemp for G:\steam\steamapps\common\Skyrim is easy to figure out, but what about Linux?
On Linux (and macOS?), move up to find the last parent of the Data folder that has the same device ID and user ID, i.e. is on the same filesystem/device and owned by the same user.
We should probably also mark the folder clearly - a generated README in there?
Yup
Should we hide it? Our current temp folder is obviously hidden as well, so...
Overview
Using the global directory is mostly fine on Windows (where it'll reside on a physical disk), but on Linux it usually sits in RAM. And if you happen to fill it up, the entire machine can deadlock.
Instead it'd be better to create an option for this (falling back to the global directory during early boot, before settings are loaded), defaulting to e.g.
Bash Mod Data/Temp
. This way a user can easily adjust it via settings.Pros:
C:
(where%Temp%
normally is), e.g. toG:
. This means a BAIN installation proceeds as follows: extract toC:
-> move toG:
. Since these are separate devices, the data has to be physically copied from one to the other. If we have our temp dir onG:
however, the move is on a single device - this is nearly instant on most filesystems and should make BAIN installations much faster.Cons:
OpenResolved QuestionsG:\.wbtemp
forG:\steam\steamapps\common\Skyrim
is easy to figure out, but what about Linux?Sub-issue of #243.