Fix for reading worlds from local dir
This commit is contained in:
@@ -1721,11 +1721,11 @@ def get_worlds():
|
|||||||
world_path = os.path.join(".", dir)
|
world_path = os.path.join(".", dir)
|
||||||
try:
|
try:
|
||||||
info = nbt.load(world_dat)[1]
|
info = nbt.load(world_dat)[1]
|
||||||
info['Data']['path'] = world_path.decode(loc)
|
info['Data']['path'] = world_path
|
||||||
if 'LevelName' in info['Data'].keys():
|
if 'LevelName' in info['Data'].keys():
|
||||||
ret[info['Data']['LevelName']] = info['Data']
|
ret[info['Data']['LevelName']] = info['Data']
|
||||||
except nbt.CorruptNBTError:
|
except nbt.CorruptNBTError:
|
||||||
ret[os.path.basename(world_path).decode(loc) + " (corrupt)"] = {'path': world_path.decode(loc),
|
ret[os.path.basename(world_path) + " (corrupt)"] = {'path': world_path,
|
||||||
'LastPlayed': 0,
|
'LastPlayed': 0,
|
||||||
'Time': 0,
|
'Time': 0,
|
||||||
'IsCorrupt': True}
|
'IsCorrupt': True}
|
||||||
|
|||||||
Reference in New Issue
Block a user