Commit 86a8cd9f by Sven Strickroth2 Committed by Patrick Steinhardt

filebuf: fix resolving absolute symlinks

The symlink destination is always concatenated to the original path. Fix
this by using `git_buf_sets` instead of `git_buf_puts`.
parent 7143145f
......@@ -246,7 +246,7 @@ static int resolve_symlink(git_buf *out, const char *path)
root = git_path_root(target.ptr);
if (root >= 0) {
if ((error = git_buf_puts(&curpath, target.ptr)) < 0)
if ((error = git_buf_sets(&curpath, target.ptr)) < 0)
goto cleanup;
} else {
git_buf dir = GIT_BUF_INIT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment