mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-24 06:19:23 -04:00
use file File.seperator instead of "/"
This commit is contained in:
parent
6395c4f92f
commit
6ca922ba2c
2 changed files with 2 additions and 3 deletions
|
@ -11,7 +11,6 @@ public class FileUtil
|
||||||
{
|
{
|
||||||
private static final Logger log = LoggerFactory.getLogger(FileUtil.class);
|
private static final Logger log = LoggerFactory.getLogger(FileUtil.class);
|
||||||
|
|
||||||
|
|
||||||
public static File getFile(String name, String suffix)
|
public static File getFile(String name, String suffix)
|
||||||
{
|
{
|
||||||
return new File(StorageDirectory.getStorageDirectory(), name + "." + suffix);
|
return new File(StorageDirectory.getStorageDirectory(), name + "." + suffix);
|
||||||
|
|
|
@ -50,9 +50,9 @@ public class StorageDirectory
|
||||||
// check if it is packed into a mac app (e.g.: "/Users/mk/Desktop/bitsquare.app/Contents/Java/bitsquare.jar")
|
// check if it is packed into a mac app (e.g.: "/Users/mk/Desktop/bitsquare.app/Contents/Java/bitsquare.jar")
|
||||||
if (executionRoot.getCanonicalPath().endsWith(".app/Contents/Java/bitsquare.jar") && System.getProperty("os.name").startsWith("Mac"))
|
if (executionRoot.getCanonicalPath().endsWith(".app/Contents/Java/bitsquare.jar") && System.getProperty("os.name").startsWith("Mac"))
|
||||||
return executionRoot.getParentFile().getParentFile().getParentFile().getParentFile();
|
return executionRoot.getParentFile().getParentFile().getParentFile().getParentFile();
|
||||||
else if (executionRoot.getCanonicalPath().endsWith("/target/classes"))
|
else if (executionRoot.getCanonicalPath().endsWith(File.separator + "target" + File.separator + "classes"))
|
||||||
return executionRoot.getParentFile(); // dev e.g.: /Users/mk/Documents/_intellij/bitsquare/target/classes -> use target as root
|
return executionRoot.getParentFile(); // dev e.g.: /Users/mk/Documents/_intellij/bitsquare/target/classes -> use target as root
|
||||||
else if (executionRoot.getCanonicalPath().endsWith("/bitsquare.jar"))
|
else if (executionRoot.getCanonicalPath().endsWith(File.separator + "bitsquare.jar"))
|
||||||
return executionRoot.getParentFile(); // dev with jar e.g.: Users/mk/Documents/_intellij/bitsquare/out/artifacts/bitsquare2/bitsquare.jar -> use target as root
|
return executionRoot.getParentFile(); // dev with jar e.g.: Users/mk/Documents/_intellij/bitsquare/out/artifacts/bitsquare2/bitsquare.jar -> use target as root
|
||||||
else
|
else
|
||||||
return executionRoot;
|
return executionRoot;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue