don't break if HOME is undefined

This commit is contained in:
Simon Michael 2009-11-19 01:48:37 +00:00
parent 26848584ee
commit 7b1458c9a5

View File

@ -37,7 +37,7 @@ myLedgerPath :: IO String
myLedgerPath = myLedgerPath =
getEnv ledgerenvvar `catch` getEnv ledgerenvvar `catch`
(\_ -> do (\_ -> do
home <- getHomeDirectory home <- getHomeDirectory `catch` (\_ -> return "")
return $ home </> ledgerdefaultfilename) return $ home </> ledgerdefaultfilename)
-- | Get the user's default timelog file path. -- | Get the user's default timelog file path.