From 9d49fe2c172b135a1a3735827df014b5f45d99a2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 15 Mar 2011 21:34:13 -0400 Subject: first pass at using new keys It compiles. It sorta works. Several subcommands are FIXME marked and broken, because things that used to accept separate --backend and --key params need to be changed to accept just a --key that encodes all the key info, now that there is metadata in keys. --- Upgrade.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Upgrade.hs') diff --git a/Upgrade.hs b/Upgrade.hs index 3c16bcc86..7469d9ba7 100644 --- a/Upgrade.hs +++ b/Upgrade.hs @@ -13,6 +13,7 @@ import Control.Monad.State (liftIO) import Control.Monad (filterM, forM_) import System.Posix.Files import System.FilePath +import Data.Maybe import Content import Types @@ -74,7 +75,7 @@ getKeysPresent0' dir = do else do contents <- liftIO $ getDirectoryContents dir files <- liftIO $ filterM present contents - return $ map fileKey files + return $ catMaybes $ map fileKey files where present d = do result <- try $ -- cgit v1.2.3