mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-03 09:20:34 +00:00
Fix bug in dir_for_path
The last checkin accidentally broke dir_for_path by propogating the dirname return code even when there was no error.
This commit is contained in:
parent
6a67a812c2
commit
15debaf5da
@ -551,7 +551,8 @@ int git_futils_dir_for_path(git_buf *dir, const char *path, const char *base)
|
||||
|
||||
/* call dirname if this is not a directory */
|
||||
if (error == GIT_SUCCESS && git_futils_isdir(dir->ptr) != GIT_SUCCESS)
|
||||
error = git_path_dirname_r(dir, dir->ptr);
|
||||
if (git_path_dirname_r(dir, dir->ptr) < GIT_SUCCESS)
|
||||
error = git_buf_lasterror(dir);
|
||||
|
||||
if (error == GIT_SUCCESS)
|
||||
error = git_path_to_dir(dir);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user