Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default download location to XDG_CACHE_HOME rather than downloads #237

Open
ctrlaltf24 opened this issue Nov 30, 2024 · 4 comments · May be fixed by #298
Open

Change default download location to XDG_CACHE_HOME rather than downloads #237

ctrlaltf24 opened this issue Nov 30, 2024 · 4 comments · May be fixed by #298
Milestone

Comments

@ctrlaltf24
Copy link
Contributor

Downloads should continue to be scanned after cache home (which is normally ~/.cache)

This is a nice to have if you like to keep your downloads folder clean

There is a single base directory relative to which user-specific non-essential (cached) data should be written. This directory is defined by the environment variable $XDG_CACHE_HOME.
https://specifications.freedesktop.org/basedir-spec/latest/

https://specifications.freedesktop.org/basedir-spec/latest/

@thw26 thw26 added this to the Release 1.0.0 milestone Dec 5, 2024
@ctrlaltf24
Copy link
Contributor Author

It should be noted arch (which we support) doesn't create the Downloads directory by default, nor does it set XDG_DOWNLOAD_DIR.

@n8marti
Copy link
Collaborator

n8marti commented Feb 6, 2025

Ubuntu doesn't set $XDG_CACHE_HOME:

$ env | grep -i xdg
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_MENU_PREFIX=gnome-
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_TYPE=wayland
XDG_CURRENT_DESKTOP=ubuntu:GNOME
XDG_SESSION_CLASS=user
XDG_RUNTIME_DIR=/run/user/1000
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/home/nate/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

But we could fall back to $HOME/.cache.

The historical reason for using ~/Downloads (from my perspective, anyway), is that it has allowed a naïve user to pre-download the necessary parts using their browser at a time and place where the internet is more performant, then later perform the installation with a more limited (in speed or affordability) connection. This was more useful when the only external download was the Logos offline installer. Now we have that, plus the appimage, plus ICU files, and who knows what else down the road. So I agree that it makes good sense to check both locations for the necessary files, then, if we download them, put them in $HOME/.cache instead of ~/Downloads.

@n8marti
Copy link
Collaborator

n8marti commented Feb 6, 2025

I assume this would actually place files into $HOME/.cache/FaithLife-Community, right?

@n8marti n8marti linked a pull request Feb 6, 2025 that will close this issue
@ctrlaltf24
Copy link
Contributor Author

I assume this would actually place files into $HOME/.cache/FaithLife-Community, right?

Correct, we'd want to put it in there. Logic something like:

f"{os.getenv("XDG_CACHE_HOME", "~/.cache")}/FaithLife-Community"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants