mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-23 08:08:47 -05:00
+ check if sectors/sectors2 directories exist before attempting to read them
This commit is contained in:
parent
5df1b218a4
commit
eeebf632e8
@ -73,6 +73,7 @@ xlist = []
|
|||||||
zlist = []
|
zlist = []
|
||||||
|
|
||||||
# List all sectors to memory and calculate the width and heigth of the resulting picture.
|
# List all sectors to memory and calculate the width and heigth of the resulting picture.
|
||||||
|
if os.path.exists(path + "sectors2"):
|
||||||
for filename in os.listdir(path + "sectors2"):
|
for filename in os.listdir(path + "sectors2"):
|
||||||
for filename2 in os.listdir(path + "sectors2/" + filename):
|
for filename2 in os.listdir(path + "sectors2/" + filename):
|
||||||
x = hex_to_int(filename)
|
x = hex_to_int(filename)
|
||||||
@ -83,6 +84,8 @@ for filename in os.listdir(path + "sectors2"):
|
|||||||
continue
|
continue
|
||||||
xlist.append(x)
|
xlist.append(x)
|
||||||
zlist.append(z)
|
zlist.append(z)
|
||||||
|
|
||||||
|
if os.path.exists(path + "sectors"):
|
||||||
for filename in os.listdir(path + "sectors"):
|
for filename in os.listdir(path + "sectors"):
|
||||||
x = hex4_to_int(filename[:4])
|
x = hex4_to_int(filename[:4])
|
||||||
z = hex4_to_int(filename[-4:])
|
z = hex4_to_int(filename[-4:])
|
||||||
|
Loading…
Reference in New Issue
Block a user