Fix fileio functions#20
Conversation
|
To give you some background on the original choice of: return pwd.getpwuid(os.getuid())[5]This returns the user based on their uid, as opposed to other (not as certain) methods like looking at $HOME. It was something that gmk of Singularity taught me how to do, and I believe is a more secure approach to getting the user home (but not needed here). If you look at the docs for getpass, they are using environment variables and falling back to pwd:
It makes me a bit uneasy, but my unease is overkill for this case. Thanks for this check! I've redone the fix (without removing the test) and it's now merged into master - I'm going to close here, please take a look and if the changes are satisfactory we can close #19. |
/home/<uname>. For example, I'm on OSX and so my home dir is/Users/cbaker, hence the test that I dropped in 4b23cc7 was failing.