open-webui/backend
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
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix: avoid overriding DATA_DIR and prevent errors when directories are the same 2024-09-05 14:17:58 +08:00
.dockerignore
.gitignore
dev.sh refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
requirements.txt Merge pull request #5127 from open-webui/dependabot/pip/pip-5bab50f10f 2024-09-03 20:17:04 +02:00
start_windows.bat fix scripts to point to correct path 2024-09-04 20:27:30 +02:00
start.sh refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00