Catch empty standard paths
This commit is contained in:
parent
161b2ef7af
commit
0253dd6977
@ -217,8 +217,9 @@ def get_standard_dir(typ):
|
|||||||
# but we don't want that to happen.
|
# but we don't want that to happen.
|
||||||
qapp.setOrganizationName(None)
|
qapp.setOrganizationName(None)
|
||||||
try:
|
try:
|
||||||
# FIXME RuntimeLocation "can be empty on some systems", wat.
|
|
||||||
path = QStandardPaths.writableLocation(typ)
|
path = QStandardPaths.writableLocation(typ)
|
||||||
|
if not path:
|
||||||
|
raise ValueError("QStandardPaths returned an empty value!")
|
||||||
# Qt seems to use '/' as path separator even on Windows...
|
# Qt seems to use '/' as path separator even on Windows...
|
||||||
path = path.replace('/', os.sep)
|
path = path.replace('/', os.sep)
|
||||||
appname = qapp.applicationName()
|
appname = qapp.applicationName()
|
||||||
|
Loading…
Reference in New Issue
Block a user