##// END OF EJS Templates
store: abstract out how we retrieve a file's size
Bryan O'Sullivan -
r17154:d592759a default
parent child Browse files
Show More
@@ -391,15 +391,16 class fncachestore(basicstore):
391 391 def join(self, f):
392 392 return self.path + '/' + self.encode(f)
393 393
394 def getsize(self, path):
395 return os.stat(self.path + '/' + path).st_size
396
394 397 def datafiles(self):
395 398 rewrite = False
396 399 existing = []
397 spath = self.path
398 400 for f in self.fncache:
399 401 ef = self.encode(f)
400 402 try:
401 st = os.stat(spath + '/' + ef)
402 yield f, ef, st.st_size
403 yield f, ef, self.getsize(ef)
403 404 existing.append(f)
404 405 except OSError:
405 406 # nonexistent entry
General Comments 0
You need to be logged in to leave comments. Login now