-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symlink review #9384
base: master
Are you sure you want to change the base?
Symlink review #9384
Conversation
They do not involve base-2 exponential effects, so they should be Normal base-10 round numbers.
src/libfetchers/input-accessor.cc
Outdated
while (true) { | ||
// Basic cycle/depth limit to avoid infinite loops. | ||
if (++followCount >= maxFollow) | ||
throw Error("too many levels of symbolic links while traversing the path '%s'; assuming it leads to a cycle after following %d indirections", this->to_string(), maxFollow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw Error("too many levels of symbolic links while traversing the path '%s'; assuming it leads to a cycle after following %d indirections", this->to_string(), maxFollow); | |
throw Error("cycle detected following symlink '%s'", this->to_string()); |
After 1000 links we can safely assume there's a cycle, so no need to be very verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed with @roberth in real time, it seems like this code is missing some deleted lines, because shouldn't resolve symlinks have something to do with follow symlinks? (and there is already some symlink code in libeval too I thought.)
Ah I see |
Motivation
Did #9363 (review) myself because we were optimizing for a quick release.
Context
Priorities
Add 馃憤 to pull requests you find important.