diff options
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index ed095717e262..37e158e4aff0 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -105,8 +105,7 @@ Path canonPath(const Path & path, bool resolveSymlinks) /* If s points to a symlink, resolve it and restart (since the symlink target might contain new symlinks). */ if (resolveSymlinks && isLink(s)) { - followCount++; - if (followCount >= maxFollow) + if (++followCount >= maxFollow) throw Error(format("infinite symlink recursion in path `%1%'") % path); temp = absPath(readLink(s), dirOf(s)) + string(i, end); |