Skip to content

Use a per-user directory instead of /tmp/mintreport - #143

Open
dualfroz wants to merge 1 commit into
linuxmint:masterfrom
dualfroz:fix/139-per-user-tmp-dir
Open

dualfroz wants to merge 1 commit into
linuxmint:masterfrom
dualfroz:fix/139-per-user-tmp-dir

Conversation

@dualfroz

Copy link
Copy Markdown

/tmp/mintreport was the same for every user and ended up owned by whoever started mintreport first, so for the next user the rm -rf failed and writing /tmp/mintreport/inxi gave the permission error from the issue, closes #139. the temp files now go to GLib.get_user_cache_dir()/mintreport. that path comes from the home dir and can have spaces, so the os.system mkdir/rm/cp/xdg-open and the pastebin call that used it are shutil/argument lists now. also dropped the unused TMP_DIR from common.py so it doesnt point at the old place. tried it with two users in a row, both get their own dir and the inxi report should be written for each of them now

/tmp/mintreport was shared by everyone, so once one user ran mintreport
the next user couldnt clean it or write the inxi report into it. Keep
the files in the user cache directory instead. Since that path can now
contain spaces, the shell calls that used it go through shutil and
argument lists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

mintreport permission error on /tmp/mintreport/inxi

1 participant