diff --git a/core/src/main/groovy/com/muwire/core/files/BasePersisterService.groovy b/core/src/main/groovy/com/muwire/core/files/BasePersisterService.groovy index 5e47e493..43c5dae4 100644 --- a/core/src/main/groovy/com/muwire/core/files/BasePersisterService.groovy +++ b/core/src/main/groovy/com/muwire/core/files/BasePersisterService.groovy @@ -138,7 +138,7 @@ abstract class BasePersisterService extends Service{ protected static toJson(SharedFile sf) { def json = [:] - json.file = sf.getB64EncodedFileName() + json.file = Base64.encode(DataUtil.encodei18nString(sf.file.toString())) json.length = sf.getCachedLength() json.root = Base64.encode(sf.getRoot()) json.pieceSize = sf.getPieceSize() diff --git a/core/src/main/java/com/muwire/core/SharedFile.java b/core/src/main/java/com/muwire/core/SharedFile.java index 7be6e7fd..c2882cdf 100644 --- a/core/src/main/java/com/muwire/core/SharedFile.java +++ b/core/src/main/java/com/muwire/core/SharedFile.java @@ -27,7 +27,6 @@ public class SharedFile { private final long cachedLength; private String b64PathHash; - private final String b64EncodedFileName; private volatile String comment; private final Set downloaders = Collections.synchronizedSet(new HashSet<>()); @@ -42,7 +41,6 @@ public class SharedFile { this.pieceSize = pieceSize; this.cachedPath = file.getAbsolutePath(); this.cachedLength = file.length(); - this.b64EncodedFileName = Base64.encode(DataUtil.encodei18nString(file.toString())); } public File getFile() { @@ -81,10 +79,6 @@ public class SharedFile { return rv; } - public String getB64EncodedFileName() { - return b64EncodedFileName; - } - public String getCachedPath() { return cachedPath; }