Commit 7d1e34ec authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

appdataDir did not always return the right path

- strip last part of path only if it is not a directory
- if path for client does not end with /kajongg, append it
parent 323d0895
......@@ -105,7 +105,11 @@ def appdataDir():
result = QStandardPaths.writableLocation(QStandardPaths.AppDataLocation)
# this may end with or .pyw or whatever, so fix that:
result = os.path.join(os.path.dirname(result), 'kajongg')
if not os.path.isdir(result):
result = os.path.dirname(result)
if not result.endswith('kajongg'):
# when called first, QApplication.applicationName is not yet set
result = result + '/kajongg'
if not os.path.exists(result):
return result
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment