From 653d0631fcfbd9d377cd8b01a8ffea3c0d575613 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 2 Jun 2016 03:27:10 +0200 Subject: use getIdentities --- ymir/mlmmj-expose.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ymir') diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix index 185bac80..2357584e 100644 --- a/ymir/mlmmj-expose.nix +++ b/ymir/mlmmj-expose.nix @@ -52,7 +52,7 @@ let case args of [listDir, (map toLower -> ident)] -> do setCurrentDirectory listDir - identities <- (read <$> readFile "exposed.ids") `catchIOError` (\e -> if isDoesNotExistError e then return [] else ioError e) + identities <- getIdentities case ident `elem` identities of True -> putStrLn "Identity is already known" False -> writeFile "exposed.ids" . unlines $ ident : identities -- cgit v1.2.3