Move the tmp_ui_path removal to avoid potential issues in web UI

This commit is contained in:
Théophile Diot 2024-03-22 09:41:25 +00:00
parent 873dbdc014
commit fbabbbd8d6
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -1384,12 +1384,12 @@ def plugins():
args=("plugins",),
).start()
# Remove tmp folder
if tmp_ui_path.exists():
rmtree(str(tmp_ui_path), ignore_errors=True)
return redirect(url_for("loading", next=url_for("plugins"), message="Reloading plugins"))
# Remove tmp folder
if tmp_ui_path.is_dir():
rmtree(tmp_ui_path, ignore_errors=True)
plugins = app.config["CONFIG"].get_plugins()
plugins_internal = 0
plugins_external = 0