Skip to content

interp: add safeguards when searching for vendor root.#1522

Merged
traefiker merged 1 commit into
traefik:masterfrom
dennwc:win_root
Mar 13, 2023
Merged

interp: add safeguards when searching for vendor root.#1522
traefiker merged 1 commit into
traefik:masterfrom
dennwc:win_root

Conversation

@dennwc

@dennwc dennwc commented Mar 11, 2023

Copy link
Copy Markdown
Contributor

With certain yaegi configuration on Windows, the loop in previousRoot can be infinite, because it fails to recognize driver letters as root.

This change adds a few more safeguards: checks path prefix earlier and checks if filepath.Dir produces an empty path.

With certain yaegi configuration on Windows, the loop in previousRoot can be infinite, because it fails to recognize driver letters as root.

This change adds a few more safeguards: checks path prefix earlier and checks if filepath.Dir produces an empty path.

@mvertes mvertes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mvertes mvertes changed the title More safeguards when searching for vendor root. interp: add safeguards when searching for vendor root. Mar 13, 2023
@mvertes mvertes added bug Something isn't working area/core os/windows labels Mar 13, 2023
@mvertes mvertes added this to the v0.15.x milestone Mar 13, 2023
@traefiker traefiker merged commit 166fff7 into traefik:master Mar 13, 2023
@dennwc dennwc deleted the win_root branch August 30, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core bug Something isn't working os/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants