Skip to content

fix: support Windows filesystem paths - #156

Open
mikemikimike wants to merge 1 commit into
open-webui:mainfrom
mikemikimike:fix/windows-compatibility-issue-154
Open

fix: support Windows filesystem paths#156
mikemikimike wants to merge 1 commit into
open-webui:mainfrom
mikemikimike:fix/windows-compatibility-issue-154

Conversation

@mikemikimike

Copy link
Copy Markdown

Summary

Fixes #154.

  • Preserve Windows drive-letter paths in /files/serve/{path} instead of prepending / to C:/... paths.
  • Fall back to os.access(path, os.W_OK) when effective_ids=True is unsupported on Windows.
  • Add regression tests for both compatibility bugs.

Compatibility

This preserves the existing leading-slash behavior for POSIX and relative paths. On Windows, drive-letter paths are passed through unchanged. No API changes are introduced.

Verification

  • pytest -q tests/test_windows_compatibility.py — 2 passed (one existing pytest deprecation warning)
  • python -m compileall -q open_terminal — passed
  • git diff --check — passed

The full test suite was not run because the repository currently has no existing test suite beyond the focused regression coverage added here. Docker image builds were not run because this change is limited to Python unit behavior and does not alter image configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two compatibility bugs: serve_file path corruption + effective_ids crash

1 participant