Skip to content

Commit d5c2f6a

Browse files
committed
Clean old files
1 parent 902fdec commit d5c2f6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

manager/manager/manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ def prepare_custom_universe(self, cfg_dict):
296296
_, _, zip_file = cfg_dict["zip"].partition("base64,")
297297

298298
universe_ref = "/workspace/worlds/src/" + cfg_dict["name"]
299+
# Remove old content
300+
if os.path.exists("/workspace/worlds"):
301+
shutil.rmtree("/workspace/worlds", ignore_errors=False)
302+
299303
# Create the folder if it doesn't exist
300304
universe_folder = universe_ref + "/"
301305
if not os.path.exists(universe_folder):

0 commit comments

Comments
 (0)