From 727828659943196ca0cc6c03db9b20ec23f27f19 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 21 Sep 2010 22:36:06 -0400 Subject: [PATCH] get_worlds only considers world dirs of length 6 (I like to store backups of my worlds in the same dir as World1.tar and it was trying to open up world number 'r') --- world.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/world.py b/world.py index 3866491..d0dd985 100644 --- a/world.py +++ b/world.py @@ -146,7 +146,7 @@ def get_worlds(): ret = {} save_dir = get_save_dir() for dir in os.listdir(save_dir): - if dir.startswith("World"): + if dir.startswith("World") and len(dir) == 6: world_n = int(dir[-1]) info = nbt.load(os.path.join(save_dir, dir, "level.dat"))[1] info['Data']['path'] = os.path.join(save_dir, dir)