more helpful error if given worlddir does not contain level.dat
This commit is contained in:
@@ -177,6 +177,11 @@ def main():
|
|||||||
logging.error("Invalid world number")
|
logging.error("Invalid world number")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
# final sanity check for worlddir
|
||||||
|
if not os.path.exists(os.path.join(worlddir, 'level.dat')):
|
||||||
|
logging.error("Invalid world path -- does not contain level.dat")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
if options.delete:
|
if options.delete:
|
||||||
return delete_all(worlddir, None)
|
return delete_all(worlddir, None)
|
||||||
|
|||||||
Reference in New Issue
Block a user