##// END OF EJS Templates
store: replace invocation of "getsize()" by "vfs.stat()"...
FUJIWARA Katsunori -
r17727:6492b39a default
parent child Browse files
Show More
@@ -459,6 +459,7 b' class fncachestore(basicstore):'
459 459 self.pathsep = self.path + '/'
460 460 self.createmode = _calcmode(vfs)
461 461 vfs.createmode = self.createmode
462 self.rawvfs = vfs
462 463 fnc = fncache(vfs)
463 464 self.fncache = fnc
464 465 self.vfs = _fncachevfs(vfs, fnc, encode)
@@ -467,16 +468,14 b' class fncachestore(basicstore):'
467 468 def join(self, f):
468 469 return self.pathsep + self.encode(f)
469 470
470 def getsize(self, path):
471 return os.stat(self.pathsep + path).st_size
472
473 471 def datafiles(self):
474 472 rewrite = False
475 473 existing = []
474 getstat = self.rawvfs.stat
476 475 for f in sorted(self.fncache):
477 476 ef = self.encode(f)
478 477 try:
479 yield f, ef, self.getsize(ef)
478 yield f, ef, getstat(ef).st_size
480 479 existing.append(f)
481 480 except OSError, err:
482 481 if err.errno != errno.ENOENT:
General Comments 0
You need to be logged in to leave comments. Login now