forked from openlp/openlp
Fix Windows data dir
This commit is contained in:
parent
186eec0eb3
commit
dd62045678
@ -165,6 +165,8 @@ def _get_os_dir_path(dir_type):
|
||||
Return a path based on which OS and environment we are running in.
|
||||
"""
|
||||
if sys.platform == u'win32':
|
||||
if dir_type == AppLocation.DataDir:
|
||||
return os.path.join(os.getenv(u'APPDATA'), u'openlp', u'data')
|
||||
return os.path.join(os.getenv(u'APPDATA'), u'openlp')
|
||||
elif sys.platform == u'darwin':
|
||||
if dir_type == AppLocation.DataDir:
|
||||
@ -180,8 +182,7 @@ def _get_os_dir_path(dir_type):
|
||||
return os.path.join(BaseDirectory.xdg_data_home, u'openlp')
|
||||
elif dir_type == AppLocation.CacheDir:
|
||||
return os.path.join(BaseDirectory.xdg_cache_home, u'openlp')
|
||||
else:
|
||||
return os.path.join(os.getenv(u'HOME'), u'.openlp')
|
||||
return os.path.join(os.getenv(u'HOME'), u'.openlp')
|
||||
|
||||
def _get_frozen_path(frozen_option, non_frozen_option):
|
||||
"""
|
||||
@ -189,8 +190,7 @@ def _get_frozen_path(frozen_option, non_frozen_option):
|
||||
"""
|
||||
if hasattr(sys, u'frozen') and sys.frozen == 1:
|
||||
return frozen_option
|
||||
else:
|
||||
return non_frozen_option
|
||||
return non_frozen_option
|
||||
|
||||
def check_latest_version(current_version):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user