REF clean up asks
This commit is contained in:
parent
0fda1a55a3
commit
335c5b74c9
|
@ -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.
|
-- the cifs mount call will prompt for a password and hang otherwise.
|
||||||
pwd <- if M.member "guest" o
|
pwd <- if M.member "guest" o
|
||||||
then return Nothing
|
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 }
|
let r = Removable { deviceSpec = smartSlashPrefix s, label = takeFileName d }
|
||||||
return $ CIFS r d pwd
|
return $ CIFS r d pwd
|
||||||
where
|
where
|
||||||
|
@ -360,7 +360,7 @@ getVeracryptDevices :: RofiIO MountConf [VeraCrypt]
|
||||||
getVeracryptDevices = mapM toDev =<< asks vcMounts
|
getVeracryptDevices = mapM toDev =<< asks vcMounts
|
||||||
where
|
where
|
||||||
toDev (d, s) = do
|
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 }
|
let r = Removable { deviceSpec = s, label = takeFileName d }
|
||||||
return $ VeraCrypt r d pwd
|
return $ VeraCrypt r d pwd
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue