forked from Qortal/qortal
Use lowercase directory names for consistency
This commit is contained in:
parent
4ba72f7eeb
commit
095083bcfb
@ -169,19 +169,18 @@ public class ArbitraryDataFile {
|
|||||||
if (hash58 == null) {
|
if (hash58 == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String hash58First2Chars = hash58.substring(0, 2);
|
String hash58First2Chars = hash58.substring(0, 2).toLowerCase();
|
||||||
String hash58Next2Chars = hash58.substring(2, 4);
|
String hash58Next2Chars = hash58.substring(2, 4).toLowerCase();
|
||||||
String outputDirectory = Settings.getInstance().getDataPath() + File.separator + hash58First2Chars + File.separator + hash58Next2Chars;
|
Path directory = Paths.get(Settings.getInstance().getDataPath(), hash58First2Chars, hash58Next2Chars);
|
||||||
Path outputDirectoryPath = Paths.get(outputDirectory);
|
|
||||||
|
|
||||||
if (createDirectories) {
|
if (createDirectories) {
|
||||||
try {
|
try {
|
||||||
Files.createDirectories(outputDirectoryPath);
|
Files.createDirectories(directory);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IllegalStateException("Unable to create data subdirectory");
|
throw new IllegalStateException("Unable to create data subdirectory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Paths.get(outputDirectory, hash58);
|
return Paths.get(directory.toString(), hash58);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ValidationResult isValid() {
|
public ValidationResult isValid() {
|
||||||
|
Loading…
Reference in New Issue
Block a user