mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Use Utils.isWindows() helper consistently.
This commit is contained in:
@@ -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/";
|
||||
|
Reference in New Issue
Block a user