data home

This commit is contained in:
j 2016-06-06 19:34:12 +02:00
parent 18aebe76d3
commit 4bc6155c3f

View file

@ -173,7 +173,8 @@ if __name__ == '__main__':
if sys.platform == 'darwin': if sys.platform == 'darwin':
target = os.path.expanduser('~/Library/Application Support/Open Media Libary') target = os.path.expanduser('~/Library/Application Support/Open Media Libary')
elif sys.platform.startswith('linux'): elif sys.platform.startswith('linux'):
target = os.path.expanduser('~/.local/share/openmedialibrary') data_home = os.path.expanduser(os.environ.get('XDG_DATA_HOME', '~/.local/share'))
target = os.path.join(data_home, 'openmedialibrary')
else: else:
target = os.path.join(os.curdir, 'openmedialibrary') target = os.path.join(os.curdir, 'openmedialibrary')
elif len(sys.argv) != 2: elif len(sys.argv) != 2: