open-webui/backend/open_webui
vikrantrathore 74169b0320
fix: avoid overriding DATA_DIR and prevent errors when directories are the same
Previously, the `DATA_DIR` environment variable was always overridden by defaulting to `OPEN_WEBUI_DIR / "data"`, which ignored user-defined `DATA_DIR` values. Additionally, when `DATA_DIR` and `NEW_DATA_DIR` were the same, the script attempted to copy files into themselves, leading to errors or redundant operations.

This commit ensures that:
1. The `DATA_DIR` environment variable is respected and not overridden.
2. Copy operations between `DATA_DIR` and `NEW_DATA_DIR` are only performed if the directories are different, preventing errors when they point to the same location.

These changes resolve potential file copy errors and preserve user configurations.
2024-09-05 14:17:58 +08:00
..
apps refac 2024-09-04 20:00:47 +02:00
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
migrations refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
static refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
test refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
utils refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
__init__.py dev6 2024-09-04 17:47:51 +02:00
alembic.ini dev5 2024-09-04 17:33:39 +02:00
config.py dev5 2024-09-04 17:33:39 +02:00
constants.py refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
env.py fix: avoid overriding DATA_DIR and prevent errors when directories are the same 2024-09-05 14:17:58 +08:00
main.py refac: error handling 2024-09-04 17:52:59 +02:00