alternative solution to #13434

This commit is contained in:
AUTOMATIC1111 2023-09-30 08:23:12 +03:00
parent 1b9ca01e4f
commit ad3b8a1c41
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ def is_restartable() -> bool:
def restart_program() -> None:
"""creates file tmp/restart and immediately stops the process, which webui.bat/webui.sh interpret as a command to start webui again"""
(Path(script_path) / "tmp" / "restart").touch()
tmpdir = Path(script_path) / "tmp"
tmpdir.mkdir(parents=True, exist_ok=True)
(tmpdir / "restart").touch()
stop_program()