summaryrefslogtreecommitdiff
path: root/Annex/Init.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Init.hs')
-rw-r--r--Annex/Init.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs
index e12a8bc80..08dd91a71 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -52,13 +52,11 @@ genDescription (Just d) = return d
genDescription Nothing = do
reldir <- liftIO . relHome =<< liftIO . absPath =<< fromRepo Git.repoPath
hostname <- fromMaybe "" <$> liftIO getHostname
-#ifndef mingw32_HOST_OS
let at = if null hostname then "" else "@"
- username <- liftIO myUserName
- return $ concat [username, at, hostname, ":", reldir]
-#else
- return $ concat [hostname, ":", reldir]
-#endif
+ v <- liftIO myUserName
+ return $ concat $ case v of
+ Right username -> [username, at, hostname, ":", reldir]
+ Left _ -> [hostname, ":", reldir]
initialize :: Maybe String -> Maybe Version -> Annex ()
initialize mdescription mversion = do