mirror of https://github.com/zlatinb/muwire
avoid FS call to get file length
parent
2fba9a74ce
commit
56e9235d7b
|
@ -137,7 +137,7 @@ class PersisterService extends Service {
|
|||
private def toJson(File f, SharedFile sf) {
|
||||
def json = [:]
|
||||
json.file = Base64.encode DataUtil.encodei18nString(f.toString())
|
||||
json.length = f.length()
|
||||
json.length = sf.getCachedLength()
|
||||
InfoHash ih = sf.getInfoHash()
|
||||
json.infoHash = Base64.encode ih.getRoot()
|
||||
json.pieceSize = sf.getPieceSize()
|
||||
|
|
Loading…
Reference in New Issue