Skip to content

Commit

Permalink
Fix - setting directory creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaklinov committed Jan 14, 2017
1 parent b927ad7 commit 39b45d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/java/com/vaklinov/zcashui/OSUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,18 @@ public static String getSettingsDirectory()
dir = new File(userHome, "Library/Application Support/ZCashSwingWalletUI");
} else if (os == OS_TYPE.WINDOWS)
{
return new File(System.getenv("LOCALAPPDATA") + "\\ZCashSwingWalletUI").getCanonicalPath();
dir = new File(System.getenv("LOCALAPPDATA") + "\\ZCashSwingWalletUI");
} else
{
dir = new File(userHome.getCanonicalPath() + File.separator + ".ZCashSwingWalletUI");
}

if (!dir.exists())
{
dir.mkdirs();
if (!dir.mkdirs())
{
System.out.println("WARNING: Could not create settings directory: " + dir.getCanonicalPath());
}
}

return dir.getCanonicalPath();
Expand Down
4 changes: 2 additions & 2 deletions src/java/com/vaklinov/zcashui/ZCashUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class ZCashUI
public ZCashUI(StartupProgressDialog progressDialog)
throws IOException, InterruptedException, WalletCallException
{
super("ZCash\u00AE Swing Wallet UI 0.51 (beta)");
super("ZCash\u00AE Swing Wallet UI 0.52 (beta)");

if (progressDialog != null)
{
Expand Down Expand Up @@ -300,7 +300,7 @@ public void run()
try
{
String userDir = OSUtil.getSettingsDirectory();
File warningFlagFile = new File(userDir + "/initialInfoShown.flag");
File warningFlagFile = new File(userDir + File.separator + "initialInfoShown.flag");
if (warningFlagFile.exists())
{
return;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/ubuntu-package/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: ZCashSwingWalletUI
Version: 0.51
Version: 0.52
Section: misc
Priority: low
Architecture: all
Expand Down

0 comments on commit 39b45d1

Please sign in to comment.