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

Remove unreachable block in fs path cleanup #134

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

dmcgowan
Copy link
Member

@dmcgowan dmcgowan commented Sep 20, 2018

The block checking for the root as a prefix of an absolute link is unnecessary since the end path always gets joined with the root. In the case where the symlink path is prefixed with the root, this should be considered coincidental and the unit tests already show that the root gets correctly applied to absolute links.

Additionally inside this block there is a bug causing in incorrect truncation of the path which would
only manifest itself in this rare coincidental case.

ping @tonistiigi

The block checking for the root as a prefix of an absolute
link is unnecessary since the end path always gets joined
with the root. In the case where the symlink path is prefixed
with the root, this should be considered coincidental and the
unit tests already show that the root gets correctly applied
to absolute links. Additionally inside this block there is a
bug causing in incorrect truncation of the path which would
only manifest itself in this rare coincidental case.

Signed-off-by: Derek McGowan <[email protected]>
@tonistiigi
Copy link
Member

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants