summaryrefslogtreecommitdiff
path: root/Remote/Directory.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Directory.hs')
-rw-r--r--Remote/Directory.hs5
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