Closed kastdeur closed 4 years ago
I think it would make more sense either to use startswith()
or to not check at all (always expand), rather than look for tilde anywhere in the string.
Yeah, I'd say I'm a proponent of always expanding.
Though I find this somehow more readable. No idea why.
With this PR, one can use a tilde to represent the user's home directory.
In the docs for os.path.expanduser, it says this expansion only takes place when the character is at the front of the string, so this is an easy implementation.
I think it would be nice to have this for
music_dir
aswell, though I couldn't find the best place for it.Edit: fixed typo, added url to python docs.