diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
commit | 6c396a256c93464d726c66a95132536941871ee8 (patch) | |
tree | 7f934c9eae22a9cfd3fb1672ebd7bf6870439c81 /Remote/Directory.hs | |
parent | 185f0b687081f47d059cc0503f4f6b671868f753 (diff) |
finished hlint pass
Diffstat (limited to 'Remote/Directory.hs')
-rw-r--r-- | Remote/Directory.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 05d42136f..235f61300 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -8,13 +8,14 @@ module Remote.Directory (remote) where import qualified Data.ByteString.Lazy.Char8 as L -import IO +import System.IO.Error import Control.Exception.Extensible (IOException) import qualified Data.Map as M import Control.Monad (when) import Control.Monad.State (liftIO) import System.Directory hiding (copyFile) import System.FilePath +import Data.Maybe import Types import Types.Remote @@ -60,7 +61,7 @@ gen r u c = do directorySetup :: UUID -> RemoteConfig -> Annex RemoteConfig directorySetup u c = do -- verify configuration is sane - let dir = maybe (error "Specify directory=") id $ + let dir = fromMaybe (error "Specify directory=") $ M.lookup "directory" c liftIO $ doesDirectoryExist dir >>! error $ "Directory does not exist: " ++ dir |