Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walk up Symlink Chain #3462

Merged
merged 1 commit into from
Jul 21, 2024
Merged

Conversation

DomCristaldi
Copy link
Contributor

@DomCristaldi DomCristaldi commented Jul 21, 2024

"reload_style_on_change" would check if the target file is a symlink, but only resolves the first link. If the symlink is acutally a chain of symlinks, such as what happens with NixOS's mkOutOfStoreSymlink, we will not find the actual file style file.

Updated the symlink resolution logic to walk down the symlink chain until it finds a non-symlink. Also check against a the original filename (which may be a symlink) to guard against infinitely looping on a circular symlink chain.

"reload_style_on_change" would check if the target file is a symlink,
but only resolves the first link. If the symlink is acutally a chain of
symlink, such as what happens with NixOS's mkOutOfStoreSymlink, we will
not find the actual file style file.

Update the symlink resolution logic to walk down the symlink chain until
it finds a non-symlink. Also check against a the original filename
(which may be a symlink) to guard against infinitely looping on a
circular symlink chain.
@Alexays Alexays merged commit cece04e into Alexays:master Jul 21, 2024
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.

2 participants