if not os.path.isabs(volume_path):
volume_path = os.path.join(cwd, volume_path)
+ if tarobj.fileobj is not None:
+ tarobj.fileobj.close()
+
tarobj.open_volume(volume_path)
# wraps some args from context into the handler
Read each member and return it as a stat dict
'''
tarinfo = self.tar_obj.__iter__().__next__()
- if not tarinfo or tarinfo == self.last_member:
+ # NOTE: here we compare if tarinfo.path is the same as before
+ # instead of comparing the tarinfo object itself because the
+ # object itself might change for multivol tarinfos
+ if tarinfo is None or (self.last_member is not None and\
+ self.delta_tar.unprefixed(tarinfo.path) == self.delta_tar.unprefixed(self.last_member.path)):
raise StopIteration
self.last_member = tarinfo