From 0fde21ef0e3da863f58bc8be34285e1c05a0d781 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 2 Jun 2016 02:24:19 +0200 Subject: debugging --- ymir/mlmmj-expose.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix index 2158cd35..6dc808e3 100644 --- a/ymir/mlmmj-expose.nix +++ b/ymir/mlmmj-expose.nix @@ -26,6 +26,7 @@ let import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.Char8 as CLBS import qualified Data.ByteString as BS + import qualified Data.ByteString.Char8 as CBS import qualified Data.ByteString.Base64 as Base64 @@ -36,7 +37,7 @@ let "mlmmj-exposed" -> do args <- getArgs case args of - [listDir, (Base64.decodeLenient -> extension)] -> do + [listDir, (LBS.fromStrict . Base64.decodeLenient . CBS.pack -> extension)] -> do setCurrentDirectory listDir key <- (BS.readFile "exposed.key") `catchIOError` (\e -> if isDoesNotExistError e then randomKey >>= (\k -> BS.writeFile "exposed.key" k >> return k) else ioError e) let ((map toLower -> ident), (map toLower -> recipient)) = read . CLBS.unpack $ decryptMsg CBC key extension @@ -74,7 +75,7 @@ let getSubscribers :: IO [String] getSubscribers = map (map toLower) . concat <$> mapM (flip catchIOError (\e -> if isDoesNotExistError e then return [] else ioError e) . readDir) ["subscribers.d", "digesters.d"] where - readDir dir = concat <$> mapM (fmap lines . readFile) =<< (getDirectoryContents dir) + readDir dir = concat <$> (mapM (fmap lines . readFile) =<< (getDirectoryContents dir)) ''; buildCommand = '' mkdir -p $out/bin -- cgit v1.2.3