mirror of
https://github.com/lutris/lutris
synced 2024-09-04 23:13:35 +00:00
Expand user path in path_exists
This commit is contained in:
parent
a9f0dfabbf
commit
7b17a9a25d
|
@ -457,6 +457,8 @@ def path_exists(path, check_symlinks=False, exclude_empty=False):
|
|||
"""
|
||||
if not path:
|
||||
return False
|
||||
if path.startswith("~"):
|
||||
path = os.path.expanduser(path)
|
||||
if os.path.exists(path):
|
||||
if exclude_empty:
|
||||
return os.stat(path).st_size > 0
|
||||
|
|
Loading…
Reference in a new issue