REF clean up asks

This commit is contained in:
Nathan Dwarshuis 2021-02-14 16:32:36 -05:00
parent 0fda1a55a3
commit 335c5b74c9
1 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ fstabToCIFS FSTabEntry{ fstabSpec = s, fstabDir = d, fstabOptions = o } = do
-- the cifs mount call will prompt for a password and hang otherwise.
pwd <- if M.member "guest" o
then return Nothing
else Just . M.findWithDefault readPassword d <$> asks passwords
else asks $ Just . M.findWithDefault readPassword d . passwords
let r = Removable { deviceSpec = smartSlashPrefix s, label = takeFileName d }
return $ CIFS r d pwd
where
@ -360,7 +360,7 @@ getVeracryptDevices :: RofiIO MountConf [VeraCrypt]
getVeracryptDevices = mapM toDev =<< asks vcMounts
where
toDev (d, s) = do
pwd <- Just . M.findWithDefault readPassword d <$> asks passwords
pwd <- asks $ Just . M.findWithDefault readPassword d . passwords
let r = Removable { deviceSpec = s, label = takeFileName d }
return $ VeraCrypt r d pwd