mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-09 17:13:45 +01:00
Fix crash due to faulty game detection
This commit is contained in:
parent
895a113478
commit
4a1f654798
@ -23,8 +23,8 @@ def detect_type(path):
|
||||
elif os.path.isfile(path + "/modpack.txt") or \
|
||||
os.path.isfile(path + "/modpack.conf"):
|
||||
return ContentType.MODPACK
|
||||
elif os.path.isdir(path + "/mods"):
|
||||
return ContentType.GAME
|
||||
# elif os.path.isdir(path + "/mods"):
|
||||
# return ContentType.GAME
|
||||
elif os.path.isfile(path + "/texture_pack.conf"):
|
||||
return ContentType.TXP
|
||||
else:
|
||||
@ -155,7 +155,7 @@ class PackageTreeNode:
|
||||
checkDependencies(result["optional_depends"])
|
||||
|
||||
# Fix games using "name" as "title"
|
||||
if self.type == ContentType.GAME:
|
||||
if self.type == ContentType.GAME and "name" in result:
|
||||
result["title"] = result["name"]
|
||||
del result["name"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user