be less picky about tar directories

This commit is contained in:
Matt Mackall 2009-05-22 17:29:51 -05:00
commit dac4809c06

5
smem
View file

@ -60,8 +60,9 @@ class tardata(procdata):
self.tar = tarfile.open(source)
def _list(self):
for ti in self.tar:
if ti.name.endswith('/'):
yield ti.name[:-1]
if ti.name.endswith('/smaps'):
d,f = ti.name.split('/')
yield d
def _read(self, f):
return self.tar.extractfile(f).read()
def _readlines(self, f):