summaryrefslogtreecommitdiff
path: root/hs/src/System/Home.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hs/src/System/Home.hs')
-rw-r--r--hs/src/System/Home.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/hs/src/System/Home.hs b/hs/src/System/Home.hs
index 30a08f1..54f8b9c 100644
--- a/hs/src/System/Home.hs
+++ b/hs/src/System/Home.hs
@@ -6,7 +6,7 @@ import System.FilePath
-- Return home directory for given user, or currently logged in user.
getUserHome :: Maybe String -> IO (Either IOError String)
-getUserHome Nothing = (Just <$> getEffectiveUserName) >>= getUserHome
+getUserHome Nothing = getEffectiveUserName >>= getUserHome . Just
getUserHome (Just name) = tryIOError $ homeDirectory <$> getUserEntryForName name
-- If the first component of path is either a tilde `~', or a tilde