mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 13:37:24 +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 {
|
public void close() throws BlockStoreException {
|
||||||
try {
|
try {
|
||||||
buffer.force();
|
buffer.force();
|
||||||
if (System.getProperty("os.name").toLowerCase().contains("win")) {
|
if (Utils.isWindows()) {
|
||||||
log.info("Windows mmap hack: Forcing buffer cleaning");
|
log.info("Windows mmap hack: Forcing buffer cleaning");
|
||||||
WindowsMMapHack.forceRelease(buffer);
|
WindowsMMapHack.forceRelease(buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class BlockFileLoader implements Iterable<Block>, Iterator<Block> {
|
|||||||
public static List<File> getReferenceClientBlockFileList() {
|
public static List<File> getReferenceClientBlockFileList() {
|
||||||
String defaultDataDir;
|
String defaultDataDir;
|
||||||
String OS = System.getProperty("os.name").toLowerCase();
|
String OS = System.getProperty("os.name").toLowerCase();
|
||||||
if (OS.indexOf("win") >= 0) {
|
if (Utils.isWindows()) {
|
||||||
defaultDataDir = System.getenv("APPDATA") + "\\.bitcoin\\blocks\\";
|
defaultDataDir = System.getenv("APPDATA") + "\\.bitcoin\\blocks\\";
|
||||||
} else if (OS.indexOf("mac") >= 0 || (OS.indexOf("darwin") >= 0)) {
|
} else if (OS.indexOf("mac") >= 0 || (OS.indexOf("darwin") >= 0)) {
|
||||||
defaultDataDir = System.getProperty("user.home") + "/Library/Application Support/Bitcoin/blocks/";
|
defaultDataDir = System.getProperty("user.home") + "/Library/Application Support/Bitcoin/blocks/";
|
||||||
|
|||||||
Reference in New Issue
Block a user