Ape / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
713 stars 191 forks source link

Use cross-platform config file paths #35

Open Ape opened 7 years ago

Ape commented 7 years ago

Note that this will move '/etc/samsungctl.conf' to '/etc/xdg/samsungctl/samsungctl.conf'. The user config file should remain in '~/.config/samsungctl.conf'.

vogler commented 5 years ago

Can this be merged? I just wanted to use the pip package on Windows, but it fails b/c os.getenv("HOME") is still used.

vogler commented 5 years ago

Or just don't search for this file on Windows, it's not really a must-have, no?

vogler commented 5 years ago

Fixed it like this:

    home = os.getenv("HOME")
    if home:
        directories.append(os.path.join(home, ".config"))