Show More
@@ -464,13 +464,17 b' class fncache(object):' | |||
|
464 | 464 | self.entries = set() |
|
465 | 465 | return |
|
466 | 466 | self.entries = set(decodedir(fp.read()).splitlines()) |
|
467 | self._checkentries(fp) | |
|
468 | fp.close() | |
|
469 | ||
|
470 | def _checkentries(self, fp): | |
|
471 | """ make sure there is no empty string in entries """ | |
|
467 | 472 | if '' in self.entries: |
|
468 | 473 | fp.seek(0) |
|
469 | 474 | for n, line in enumerate(util.iterfile(fp)): |
|
470 | 475 | if not line.rstrip('\n'): |
|
471 | 476 | t = _('invalid entry in fncache, line %d') % (n + 1) |
|
472 | 477 | raise error.Abort(t) |
|
473 | fp.close() | |
|
474 | 478 | |
|
475 | 479 | def write(self, tr): |
|
476 | 480 | if self._dirty: |
General Comments 0
You need to be logged in to leave comments.
Login now