mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-31 23:59:11 +00:00
Repository: Fixed the path returned by read_gitfile (remove trailing slashes)
This commit is contained in:
parent
8b05e78018
commit
f2a60854cd
@ -418,6 +418,13 @@ static int read_gitfile(char *path_out, size_t size, const char *file_path, cons
|
||||
}
|
||||
|
||||
error = gitfo_prettify_dir_path(path_out, size, data + GIT_FILE_CONTENT_PREFIX_LENGTH, base_path);
|
||||
if (error == GIT_SUCCESS) {
|
||||
end_offset = strlen(path_out);
|
||||
|
||||
if (end_offset > 0 && path_out[end_offset - 1] == '/')
|
||||
path_out[end_offset - 1 ] = '\0';
|
||||
}
|
||||
|
||||
gitfo_free_buf(&file);
|
||||
|
||||
return error;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user