mirror of
https://github.com/open-webui/open-webui
synced 2024-11-22 08:07:55 +00:00
refac
This commit is contained in:
parent
cc19b8049a
commit
9d25207b83
@ -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"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user