##// END OF EJS Templates
store: reduce string concatenation when joining...
Bryan O'Sullivan -
r17562:b42b0729 default
parent child Browse files
Show More
@@ -390,6 +390,7 b' class fncachestore(basicstore):'
390 def __init__(self, path, openertype, encode):
390 def __init__(self, path, openertype, encode):
391 self.encode = encode
391 self.encode = encode
392 self.path = path + '/store'
392 self.path = path + '/store'
393 self.pathsep = self.path + '/'
393 self.createmode = _calcmode(self.path)
394 self.createmode = _calcmode(self.path)
394 op = openertype(self.path)
395 op = openertype(self.path)
395 op.createmode = self.createmode
396 op.createmode = self.createmode
@@ -398,10 +399,10 b' class fncachestore(basicstore):'
398 self.opener = _fncacheopener(op, fnc, encode)
399 self.opener = _fncacheopener(op, fnc, encode)
399
400
400 def join(self, f):
401 def join(self, f):
401 return self.path + '/' + self.encode(f)
402 return self.pathsep + self.encode(f)
402
403
403 def getsize(self, path):
404 def getsize(self, path):
404 return os.stat(self.path + '/' + path).st_size
405 return os.stat(self.pathsep + path).st_size
405
406
406 def datafiles(self):
407 def datafiles(self):
407 rewrite = False
408 rewrite = False
General Comments 0
You need to be logged in to leave comments. Login now