From 0db1244d04ee2f683087a65c87fa30e8c70719f5 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 6 Dec 2021 09:47:39 +0100 Subject: [PATCH] also consider TMPDIR and friends --- copyparty/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/copyparty/__init__.py b/copyparty/__init__.py index 1d62b3b6..17513708 100644 --- a/copyparty/__init__.py +++ b/copyparty/__init__.py @@ -29,12 +29,16 @@ def get_unixdir(): paths = [ (os.environ.get, "XDG_CONFIG_HOME"), (os.path.expanduser, "~/.config"), + (os.environ.get, "TMPDIR"), + (os.environ.get, "TEMP"), + (os.environ.get, "TMP"), (unicode, "/tmp"), ] for chk in [os.listdir, os.mkdir]: for pf, pa in paths: try: p = pf(pa) + # print(chk.__name__, p, pa) if not p or p.startswith("~"): continue