[PR #23464] [CLOSED] fix: use os.path.join for cross-platform audio chunk path (Windows compatibility) #27210

Closed
opened 2026-04-20 06:56:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23464
Author: @D2758695161
Created: 4/7/2026
Status: Closed

Base: mainHead: fix/windows-audio-path


📝 Commits (1)

  • 757d11b fix: use os.path.join for cross-platform chunk path construction

📊 Changes

1 file changed (+1344 additions, -1344 deletions)

View changed files

📝 backend/open_webui/routers/audio.py (+1344 -1344)

📄 Description

Fix: Windows Audio Chunk Path Bug

Issue: #23444 - wrong audio file path on Windows

Root Cause: In split_audio(), the chunk path was constructed using Python f-string concatenation:
python chunk_path = f'{base}_chunk_{i}.{format}'
On Windows, this produces paths like C:\path\uploads_chunk_0.mp3 which may cause issues in some Windows configurations due to the underscore immediately after the backslash separator.

Fix: Use os.path.join() for proper cross-platform path construction:
python chunk_path = os.path.join(os.path.dirname(base), f'{os.path.basename(base)}_chunk_{i}.{format}')

Testing: The fix ensures proper path separator handling across Windows/macOS/Linux.

Fixes #23444


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23464 **Author:** [@D2758695161](https://github.com/D2758695161) **Created:** 4/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/windows-audio-path` --- ### 📝 Commits (1) - [`757d11b`](https://github.com/open-webui/open-webui/commit/757d11b6618a0cca40e4b3504fec05e6d17aeb1d) fix: use os.path.join for cross-platform chunk path construction ### 📊 Changes **1 file changed** (+1344 additions, -1344 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/audio.py` (+1344 -1344) </details> ### 📄 Description ## Fix: Windows Audio Chunk Path Bug **Issue:** #23444 - wrong audio file path on Windows **Root Cause:** In split_audio(), the chunk path was constructed using Python f-string concatenation: `python chunk_path = f'{base}_chunk_{i}.{format}' ` On Windows, this produces paths like C:\path\uploads_chunk_0.mp3 which may cause issues in some Windows configurations due to the underscore immediately after the backslash separator. **Fix:** Use os.path.join() for proper cross-platform path construction: `python chunk_path = os.path.join(os.path.dirname(base), f'{os.path.basename(base)}_chunk_{i}.{format}') ` **Testing:** The fix ensures proper path separator handling across Windows/macOS/Linux. Fixes #23444 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 06:56:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#27210