diff --git a/ChangeLog.md b/ChangeLog.md index 0a6bbae..eafc76f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,7 @@ ## current - minor UI tweak +- minor refactoring ## 0.3.1.1 diff --git a/app/Util.hs b/app/Util.hs index 52cab11..cd29fe2 100644 --- a/app/Util.hs +++ b/app/Util.hs @@ -105,9 +105,9 @@ confirm :: String -> Request Bool confirm x = prompt (x ++ " (y/n): ") $ reqAgree Nothing $ fmap return reqChar loadFrom :: FilePath -> Request PWDatabase -loadFrom path = reqDefault +loadFrom path = fromMaybe newPWDatabase <$> reqDefault (reqIO (decodeFileStrict path)) - (Just newPWDatabase) >>= (return . fromMaybe newPWDatabase) + (Just newPWDatabase) save :: S.StateT Status IO () save = do