Address comments

This commit is contained in:
Joseph Schorr 2015-02-02 14:07:32 -05:00
parent 1022355bb1
commit 84e5c0644e
4 changed files with 7 additions and 3 deletions

View file

@ -39,6 +39,9 @@ class TarLayerFormat(object):
# Yield the tar header.
if self.path_prefix:
# Note: We use a copy here because we need to make sure we copy over all the internal
# data of the tar header. We cannot use frombuf(tobuf()), however, because it doesn't
# properly handle large filenames.
clone = copy.deepcopy(tar_info)
clone.name = os.path.join(self.path_prefix, clone.name)
yield clone.tobuf()