correct name of createDirectoryUnder in error message

This commit is contained in:
Joey Hess 2024-11-11 11:48:23 -04:00
parent db3ad985bd
commit b11c61e9db
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -77,11 +77,11 @@ createDirectoryUnder' topdirs dir0 mkdir = do
| null dirs -> | null dirs ->
liftIO $ unlessM (doesDirectoryExist (fromRawFilePath topdir)) $ liftIO $ unlessM (doesDirectoryExist (fromRawFilePath topdir)) $
ioError $ customerror doesNotExistErrorType $ ioError $ customerror doesNotExistErrorType $
"createDirectoryFrom: " ++ fromRawFilePath topdir ++ " does not exist" "createDirectoryUnder: " ++ fromRawFilePath topdir ++ " does not exist"
| otherwise -> createdirs $ | otherwise -> createdirs $
map (topdir P.</>) (reverse (scanl1 (P.</>) dirs)) map (topdir P.</>) (reverse (scanl1 (P.</>) dirs))
_ -> liftIO $ ioError $ customerror userErrorType _ -> liftIO $ ioError $ customerror userErrorType
("createDirectoryFrom: not located in " ++ unwords (map fromRawFilePath topdirs)) ("createDirectoryUnder: not located in " ++ unwords (map fromRawFilePath topdirs))
where where
customerror t s = mkIOError t s Nothing (Just (fromRawFilePath dir0)) customerror t s = mkIOError t s Nothing (Just (fromRawFilePath dir0))