From cc6c34b2cf0505d69944d117a9f2608079133f9b Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Tue, 23 Feb 2016 09:44:16 -0500 Subject: [PATCH] create chunkymapdata folder if doesn't exist --- chunkymap-regen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chunkymap-regen.py b/chunkymap-regen.py index 27f2e8a..1ea0758 100644 --- a/chunkymap-regen.py +++ b/chunkymap-regen.py @@ -222,6 +222,8 @@ if os.path.isfile(mtmn_path) and os.path.isfile(colors_path): chunkymap_players_path = os.path.join(chunkymap_data_path, chunkymap_players_name) htaccess_path = os.path.join(chunkymap_data_path,".htaccess") + if not os.path.isdir(chunkymap_players_path): + os.mkdirs(chunkymap_players_path) if not os.path.isfile(htaccess_path): deny_http_access(chunkymap_data_path) htaccess_path = os.path.join(chunkymap_players_path,".htaccess") @@ -229,7 +231,7 @@ if os.path.isfile(mtmn_path) and os.path.isfile(colors_path): deny_http_access(chunkymap_players_path) if not os.path.isdir(chunkymap_players_path): - os.mkdir(chunkymap_players_path) + os.mkdirs(chunkymap_players_path) players_path = os.path.join(world_path, "players") for dirname, dirnames, filenames in os.walk(players_path): for filename in filenames: