mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 22:46:56 +01:00
Use Utils.isWindows() helper consistently.
This commit is contained in:
parent
e0d9683bd5
commit
9e2b0c05c7
2 changed files with 2 additions and 2 deletions
|
@ -277,7 +277,7 @@ public class SPVBlockStore implements BlockStore {
|
|||
public void close() throws BlockStoreException {
|
||||
try {
|
||||
buffer.force();
|
||||
if (System.getProperty("os.name").toLowerCase().contains("win")) {
|
||||
if (Utils.isWindows()) {
|
||||
log.info("Windows mmap hack: Forcing buffer cleaning");
|
||||
WindowsMMapHack.forceRelease(buffer);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class BlockFileLoader implements Iterable<Block>, Iterator<Block> {
|
|||
public static List<File> getReferenceClientBlockFileList() {
|
||||
String defaultDataDir;
|
||||
String OS = System.getProperty("os.name").toLowerCase();
|
||||
if (OS.indexOf("win") >= 0) {
|
||||
if (Utils.isWindows()) {
|
||||
defaultDataDir = System.getenv("APPDATA") + "\\.bitcoin\\blocks\\";
|
||||
} else if (OS.indexOf("mac") >= 0 || (OS.indexOf("darwin") >= 0)) {
|
||||
defaultDataDir = System.getProperty("user.home") + "/Library/Application Support/Bitcoin/blocks/";
|
||||
|
|
Loading…
Add table
Reference in a new issue