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

Fixed pathing for OSes (GPG, TMP, Home, etc. for Windows/Linux/Unix) #104

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update path.py
Fixed variable name not being complete, and changed hard code of existing hard code constant.
  • Loading branch information
F9Alejandro authored Sep 21, 2018
commit 5748b5f748f0c10c1528b1c2a6e7f3f7ac71bad4
4 changes: 2 additions & 2 deletions libpius/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ def get_tmpdir(dir):
return os.path.join(tempdir, dir)
else:
if os.environ.get('USER') == "root":
tempdir = os.path.join('/tmp/', dir)
tempdir = os.path.join(LINUX_TEMPDIR, dir)
elif os.environ.get('XDG_RUNTIME_DIR') != "":
tempdir = os.path.join(os.environ.get('XDG_RUNTIME_DIR'), dir)
elif os.environ.get('TMPDIR') != "":
tempdir = os.path.join(os.environ.get('TMPDIR'), dir)
else:
tempdir = os.path.join(LINUX_TEMP, dir)
tempdir = os.path.join(LINUX_TEMPDIR, dir)
return tempdir

# END Stupid python optparse hack.
F9Alejandro marked this conversation as resolved.
Show resolved Hide resolved