Skip to content

fix: Handle warning filename when the file and the CWD are on different Windows drives#148

Merged
edgarrmondragon merged 1 commit into
mainfrom
fix/windows-handle-different-drives
Jun 19, 2026
Merged

fix: Handle warning filename when the file and the CWD are on different Windows drives#148
edgarrmondragon merged 1 commit into
mainfrom
fix/windows-handle-different-drives

Conversation

@edgarrmondragon

@edgarrmondragon edgarrmondragon commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

badb1c5 (#138) refactored the warning path computation to call compute_path(os.path.relpath(warning_message.filename)), but os.path.relpath() raises ValueError on
Windows when the file and the CWD are on different drive letters.

The original code had contextlib.suppress(ValueError) for this case, which was lost in the refactor.

Closes #147

@edgarrmondragon edgarrmondragon self-assigned this Jun 19, 2026
@github-actions github-actions Bot added the fix label Jun 19, 2026
@edgarrmondragon edgarrmondragon force-pushed the fix/windows-handle-different-drives branch from 642bc23 to 36f47d2 Compare June 19, 2026 13:53
…nt Windows drives

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
@edgarrmondragon edgarrmondragon force-pushed the fix/windows-handle-different-drives branch from 36f47d2 to a5094cb Compare June 19, 2026 13:59
@edgarrmondragon edgarrmondragon marked this pull request as ready for review June 19, 2026 14:04
@henryiii

Copy link
Copy Markdown
Contributor

(Looks safe and similar to before AFAICT)

@edgarrmondragon edgarrmondragon merged commit 9fb5db2 into main Jun 19, 2026
15 checks passed
@edgarrmondragon edgarrmondragon deleted the fix/windows-handle-different-drives branch June 19, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI run failing on windows due to an unmount error?

2 participants