diff options
author | eerielili <lionel@les-miquelots.net> | 2024-09-28 14:40:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-28 16:40:03 +0200 |
commit | 439c37539332781f976d4dc7dbdfa37f2b60a3bf (patch) | |
tree | 63a4dbfce62d2947cf5ec282d7923d71748eaf3f /libdino/src/util | |
parent | 8853ffead3f12778e43f08656c767690fbea76ed (diff) | |
download | dino-439c37539332781f976d4dc7dbdfa37f2b60a3bf.tar.gz dino-439c37539332781f976d4dc7dbdfa37f2b60a3bf.zip |
Store avatars in the user's cache directory. (#1621)
* Store avatars in the user's cache directory.
- Not anymore in ~/.local/share, where media files are stored.
- Already existing ~/.local/share/dino/avatars directory will be
moved to ~/.cache/dino/avatars
- If both directories already exists, the old one (in
~/.local/share) is removed.
* Simplify old-to-new-location logic
---------
Co-authored-by: fiaxh <git@lightrise.org>
Diffstat (limited to 'libdino/src/util')
-rw-r--r-- | libdino/src/util/util.vala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libdino/src/util/util.vala b/libdino/src/util/util.vala index 553ebbfe..9f7ae45f 100644 --- a/libdino/src/util/util.vala +++ b/libdino/src/util/util.vala @@ -69,6 +69,10 @@ public static string get_storage_dir() { return Path.build_filename(Environment.get_user_data_dir(), "dino"); } +public static string get_cache_dir() { + return Path.build_filename(Environment.get_user_cache_dir(), "dino"); +} + [CCode (cname = "dino_gettext", cheader_filename = "dino_i18n.h")] public static extern unowned string _(string s); |