containerd / continuity

A transport-agnostic, filesystem metadata manifest system
https://containerd.io
Apache License 2.0
139 stars 67 forks source link

Remove unreachable block in fs path cleanup #134

Closed dmcgowan closed 5 years ago

dmcgowan commented 5 years ago

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

tonistiigi commented 5 years ago

LGTM