mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
refac
This commit is contained in:
parent
cc19b8049a
commit
9d25207b83
@ -221,8 +221,11 @@ if FROM_INIT_PY:
|
|||||||
else:
|
else:
|
||||||
shutil.copy2(item, dest)
|
shutil.copy2(item, dest)
|
||||||
|
|
||||||
# And rename the old directory to _open_webui/data
|
# Zip the data directory
|
||||||
DATA_DIR.rename(DATA_DIR.parent / "_open_webui" / "data")
|
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"))
|
DATA_DIR = Path(os.getenv("DATA_DIR", OPEN_WEBUI_DIR / "data"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user