fix: pip install database save issue

This commit is contained in:
Timothy J. Baek
2024-09-26 03:02:08 +02:00
parent ee33b4e2a3
commit 3a163b6392
2 changed files with 332 additions and 13 deletions

View File

@@ -221,6 +221,9 @@ if FROM_INIT_PY:
else:
shutil.copy2(item, dest)
# And rename the old directory to _open_webui/data
DATA_DIR.rename(DATA_DIR.parent / "_open_webui" / "data")
DATA_DIR = Path(os.getenv("DATA_DIR", OPEN_WEBUI_DIR / "data"))