forked from Qortal/qortal
Fixed bug with identifier in ArbitraryDataWriter
This commit is contained in:
parent
fa684eabab
commit
dd33d24346
@ -9,6 +9,7 @@ import org.qortal.crypto.AES;
|
|||||||
import org.qortal.repository.DataException;
|
import org.qortal.repository.DataException;
|
||||||
import org.qortal.arbitrary.ArbitraryDataFile.*;
|
import org.qortal.arbitrary.ArbitraryDataFile.*;
|
||||||
import org.qortal.settings.Settings;
|
import org.qortal.settings.Settings;
|
||||||
|
import org.qortal.utils.Base58;
|
||||||
import org.qortal.utils.FilesystemUtils;
|
import org.qortal.utils.FilesystemUtils;
|
||||||
import org.qortal.utils.ZipUtils;
|
import org.qortal.utils.ZipUtils;
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ public class ArbitraryDataWriter {
|
|||||||
private void createWorkingDirectory() {
|
private void createWorkingDirectory() {
|
||||||
// Use the user-specified temp dir, as it is deterministic, and is more likely to be located on reusable storage hardware
|
// Use the user-specified temp dir, as it is deterministic, and is more likely to be located on reusable storage hardware
|
||||||
String baseDir = Settings.getInstance().getTempDataPath();
|
String baseDir = Settings.getInstance().getTempDataPath();
|
||||||
String identifier = Crypto.digest(this.filePath.toString().getBytes()).toString();
|
String identifier = Base58.encode(Crypto.digest(this.filePath.toString().getBytes()));
|
||||||
Path tempDir = Paths.get(baseDir, "writer", identifier);
|
Path tempDir = Paths.get(baseDir, "writer", identifier);
|
||||||
try {
|
try {
|
||||||
Files.createDirectories(tempDir);
|
Files.createDirectories(tempDir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user