From 44c4f503ae4c79739c52c73fdfa35e754621011c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Sep 2016 11:47:25 -0400 Subject: copy in Utility.UserInfo from git-annex This is worth doing to support falling back to HOME on systems using LDAP or NIS where getpwent fails. --- Storage/Local.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Storage') diff --git a/Storage/Local.hs b/Storage/Local.hs index 90da7b8..99b92db 100644 --- a/Storage/Local.hs +++ b/Storage/Local.hs @@ -14,12 +14,12 @@ module Storage.Local import Types import Types.Storage import Serialization () +import Utility.UserInfo import qualified Data.ByteString as B import qualified Data.ByteString.UTF8 as U8 import Data.Monoid import Data.List import Data.Maybe -import System.Posix.User import System.IO import System.Directory import System.Posix @@ -143,8 +143,8 @@ onError f a = do storageDir :: Maybe LocalStorageDirectory -> GetShareDir storageDir Nothing (Section section) = do - u <- getUserEntryForID =<< getEffectiveUserID - return $ homeDirectory u dotdir section + home <- myHomeDir + return $ home dotdir section storageDir (Just (LocalStorageDirectory d)) (Section section) = pure $ d section -- cgit v1.2.3