This commit is contained in:
Timothy J. Baek 2024-09-26 03:13:38 +02:00
parent cc19b8049a
commit 9d25207b83
1 changed files with 5 additions and 2 deletions

View File

@ -221,8 +221,11 @@ 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")
# Zip the data directory
shutil.make_archive(DATA_DIR.parent / "open_webui_data", "zip", DATA_DIR)
# Remove the old data directory
shutil.rmtree(DATA_DIR)
DATA_DIR = Path(os.getenv("DATA_DIR", OPEN_WEBUI_DIR / "data"))