minigalaxy icon indicating copy to clipboard operation
minigalaxy copied to clipboard

FR: add option to change path for temp files and installers

Open tim77 opened this issue 5 years ago • 14 comments
trafficstars

Feature request: add option to change path for temp files and installers. This could be really useful for users who want to minimize write cycles on their SSD's since Minigalaxy can write a lot of data in cache/minigalaxy/extract and cache/minigalaxy/download directories.

tim77 avatar Apr 06 '20 23:04 tim77

Thanks for reporting. I do wonder how worthwhile it would be to make this change. Maybe some environment variables can be used (although, you could already change XDG_CACHE_DIR iirc). Lets see if some people chime in who have this issue as well.

sharkwouter avatar Apr 07 '20 06:04 sharkwouter

I am not sure that this feature is really needed for most users and i also don't like idea to have dozen unnecessary options in GUI, but maybe we can add somehow this option as env variable as you already mentioned (for installers since we already have for for CACHE dir) and document this. This is very much needed for this who want to test and debug app and download many games. :)

tim77 avatar Apr 07 '20 07:04 tim77

A workaround for now would be to launch Minigalaxy like this: XDG_CACHE_HOME=/tmp minigalaxy. That way both the extract and download directory will not be kepts on the disk, since /tmp is kept in RAM. Using /tmp for extracting downloads would be risky on a lot of systems, though, since it can run out of space quickly on some systems.

sharkwouter avatar Apr 08 '20 08:04 sharkwouter

#132 also suggests this change.

sharkwouter avatar Apr 18 '20 11:04 sharkwouter

As someone who ran out of disk space on my SSD today this would be really handy ;)

JoshuaFern avatar Apr 18 '20 18:04 JoshuaFern

As someone who ran out of disk space on my SSD today this would be really handy ;)

Sorry to necro this, but I'm dealing with the same issue right now. I've solved the problem temporarily by symlinking ~/.cache/minigalaxy to a folder on my second drive

evvv-vvve avatar Dec 18 '20 03:12 evvv-vvve

I'm chiming in after I read the 1.0.1 release notes this morning. My home drive is on a moderately sized nvme and I install most non-system things onto other drives. In version 1.0.0, the installers would be placed within the same folder as my default game installation folder, which was fine because I had that set to a large drive. But now, I don't even want to upgrade to 1.0.1 because I'll have to start moving files around after they're downloaded.

I figured people would be unhappy with that, but a refactor made it temporarily the best solution. The plan for the next release is to put the installer in the same directory as the game and extract it there as well, so no separate cache directory is needed.

Minigalaxy does use the XDG standard at the moment, though. If you set the XDG_CACHE_HOME environment variable to a different directory, the cache directory will be stored there.

If you're really desparate, the code which sets the cache directory is found here: https://github.com/sharkwouter/minigalaxy/blob/1dcc82b4f9e2e00a5d58bc4116b5348b75e3df32/minigalaxy/paths.py#L10

sharkwouter avatar Jan 07 '21 15:01 sharkwouter

I figured people would be unhappy with that, but a refactor made it temporarily the best solution. The plan for the next release is to put the installer in the same directory as the game and extract it there as well, so no separate cache directory is needed.

Minigalaxy does use the XDG standard at the moment, though. If you set the XDG_CACHE_HOME environment variable to a different directory, the cache directory will be stored there.

If you're really desparate, the code which sets the cache directory is found here:

https://github.com/sharkwouter/minigalaxy/blob/1dcc82b4f9e2e00a5d58bc4116b5348b75e3df32/minigalaxy/paths.py#L10

What I did as a workaround for now is made a symlink of the downloads folder to a folder on a larger drive. This way I can keep the installers but not on fast disk. $HOME/.cache/minigalaxy/downloads -> /my/other/drive/minigalaxy_downloads

This will probably not make it into the next release. I've moved it to the milestone for the release after

sharkwouter avatar Sep 30 '21 09:09 sharkwouter