Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
log-tree: rely upon the check in the gpg_interface
[gitweb.git]
/
archive-tar.c
diff --git
a/archive-tar.c
b/archive-tar.c
index 0ba3f25cf579d6629566a39d4d5ac19b51293ed5..d1cce46e3310d64af32b231de697449ae90ddccf 100644
(file)
--- a/
archive-tar.c
+++ b/
archive-tar.c
@@
-153,6
+153,8
@@
static unsigned int ustar_header_chksum(const struct ustar_header *header)
static size_t get_path_prefix(const char *path, size_t pathlen, size_t maxlen)
{
size_t i = pathlen;
+ if (i > 1 && path[i - 1] == '/')
+ i--;
if (i > maxlen)
i = maxlen;
do {