mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-11-05 18:23:23 -05:00
Replace unmaintained appdirs by platformdirs
https://github.com/ActiveState/appdirs/commit/8734277956c1df3b85385e6b308e954910533884
This commit is contained in:
2 files changed
+5
-5
No files matched your search
@@ -133,17 +133,17 @@ orig_path = None
|
||||
|
||||
|
||||
def get_default_cachedir():
|
||||
"""Get a cachedir, using appdirs for cross-platform, but works without.
|
||||
"""Get a cachedir, using platformdirs for cross-platform, but works without.
|
||||
|
||||
Once appdirs is installed everywhere, this function can be
|
||||
Once platformdirs is installed everywhere, this function can be
|
||||
removed.
|
||||
|
||||
"""
|
||||
appname = __name__.split('.')[0]
|
||||
try:
|
||||
import appdirs
|
||||
import platformdirs
|
||||
|
||||
return appdirs.user_cache_dir(appname, 'F-Droid')
|
||||
return platformdirs.user_cache_dir(appname, 'F-Droid')
|
||||
except ImportError:
|
||||
return str(Path.home() / '.cache' / appname)
|
||||
|
||||
|
||||
Reference in new issue
Block a user