repository: decode() linkname

Reference: https://github.com/libgit2/pygit2/issues/620
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko
2016-04-15 14:13:47 +02:00
parent 51915ddf0e
commit fd9a39a91b

View File

@@ -800,7 +800,7 @@ class Repository(_Repository):
info.uname = info.gname = 'root' # just because git does this info.uname = info.gname = 'root' # just because git does this
if entry.mode == GIT_FILEMODE_LINK: if entry.mode == GIT_FILEMODE_LINK:
info.type = archive.SYMTYPE info.type = archive.SYMTYPE
info.linkname = content info.linkname = content.decode("utf-8")
info.mode = 0o777 # symlinks get placeholder info.mode = 0o777 # symlinks get placeholder
info.size = 0 info.size = 0
archive.addfile(info) archive.addfile(info)