be less picky about tar directories

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

5
smem
View file

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