0

Possibly fixed crash when HOME is undefined

When HOME was undefined on Linux, the code would try calling
os.listdir(None) which will obviously fail.

This is a workaround. A proper fix would be to rewrite the
code to check for each operating system, not a combination
of operating systems, environment variables and the current
air humidity in London.
This commit is contained in:
CounterPillow
2013-11-16 15:07:51 +01:00
parent cbd76d87a0
commit 76bab40aa2

View File

@@ -217,7 +217,7 @@ class Textures(object):
# Find an installed minecraft client jar and look in it for the texture # Find an installed minecraft client jar and look in it for the texture
# file we need. # file we need.
versiondir = None versiondir = ""
if "APPDATA" in os.environ and sys.platform.startswith("win"): if "APPDATA" in os.environ and sys.platform.startswith("win"):
versiondir = os.path.join(os.environ['APPDATA'], ".minecraft", "versions") versiondir = os.path.join(os.environ['APPDATA'], ".minecraft", "versions")
elif "HOME" in os.environ: elif "HOME" in os.environ: