diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index e4362be14..d95c92d5a 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -1700,11 +1700,11 @@ public class Wallet extends BaseTaggableObject * @throws IOException if an error occurs while saving */ public void saveToFile(File tempFile, File destFile) throws IOException { - File tempParentFile = tempFile.getParentFile(); + File tempParentFile = tempFile.getAbsoluteFile().getParentFile(); if (!tempParentFile.exists()) { throw new FileNotFoundException(tempParentFile.getPath() + " (wallet directory not found)"); } - File destParentFile = destFile.getParentFile(); + File destParentFile = destFile.getAbsoluteFile().getParentFile(); if (!destParentFile.exists()) { throw new FileNotFoundException(destParentFile.getPath() + " (wallet directory not found)"); }