diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-09-22 11:47:25 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-09-22 11:47:25 -0400 |
commit | 44c4f503ae4c79739c52c73fdfa35e754621011c (patch) | |
tree | f9c2dbdfae4b75c59b99c515657ace6ea451ca37 /Storage | |
parent | a530b4e5d54cef82c281fe386e62e4d99ef9436e (diff) | |
download | keysafe-44c4f503ae4c79739c52c73fdfa35e754621011c.tar.gz |
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.
Diffstat (limited to 'Storage')
-rw-r--r-- | Storage/Local.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |