From 32c330b5abfc601d46d1cb14fe0621a5dde86f7a Mon Sep 17 00:00:00 2001 From: PhilOtes Date: Thu, 30 Dec 2021 17:52:54 +0100 Subject: [PATCH] Checking if proto folder existing before deleting --- compiler/proto.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/proto.py b/compiler/proto.py index 23b3711..ab18d10 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -276,7 +276,8 @@ def compile(): # First folder starting with PrismarineJS folder_name = next(folder for folder in os.listdir(mc_path) if folder.startswith("PrismarineJS")) - shutil.rmtree(mc_path / 'proto') + if os.path.isdir(mc_path / 'proto'): + shutil.rmtree(mc_path / 'proto') PACKETS = { "handshaking": {