Skip to content

Commit

Permalink
Merge pull request #516 from Centrys/aw-103
Browse files Browse the repository at this point in the history
Add local.storage.dir flag
  • Loading branch information
AionJayT authored Jun 7, 2018
2 parents 1855ef8 + fdc1e7e commit 4cefbfe
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions modMcf/src/org/aion/mcf/account/Keystore.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,22 @@
public class Keystore {

private static final Logger LOG = AionLoggerFactory.getLogger(LogEnum.API.name());
private static final String KEYSTORE_PATH = System.getProperty("user.dir") + "/keystore";
private static final Path PATH = Paths.get(KEYSTORE_PATH);
private static final FileDateTimeComparator COMPARE = new FileDateTimeComparator();
private static final Pattern HEX_64 = Pattern.compile("^[\\p{XDigit}]{64}$");
private static final String ADDR_PREFIX = "0x";
private static final String AION_PREFIX = "a0";
private static final int IMPORT_LIMIT = 100;
private static final String KEYSTORE_PATH;
private static final Path PATH;

static {
String storageDir = System.getProperty("local.storage.dir");
if (storageDir == null || storageDir.equalsIgnoreCase("")) {
storageDir = System.getProperty("user.dir");
}
KEYSTORE_PATH = storageDir + "/keystore";
PATH = Paths.get(KEYSTORE_PATH);
}

private static List<File> getFiles() {
File[] files = PATH.toFile().listFiles();
Expand Down

0 comments on commit 4cefbfe

Please sign in to comment.