Compare commits

..

4 Commits

1 changed files with 5 additions and 5 deletions

10
Main.hs
View File

@ -13,8 +13,8 @@ import qualified Database.LevelDB as L
import qualified Database.LevelDB.Streaming as LS
-- Error handling
import Control.Exception as BE
import Control.Monad.Catch as CE
import Control.Exception as BE
import Control.Monad.Catch as CE
-- Configuration
import qualified Options.Applicative as O
@ -32,7 +32,7 @@ import Data.List (nub)
import Data.Maybe (mapMaybe)
import Data.Function ((&))
import Data.Default (def)
import Control.Monad (mapM_, when)
import Control.Monad (when)
import Control.Monad.Reader (ReaderT, runReaderT, asks)
import Control.Monad.Except (ExceptT, runExceptT, throwError)
import System.FilePath (joinPath, takeBaseName, (</>))
@ -189,8 +189,8 @@ deleteQuotaOrigins = do
S.restrict (by whitelist quota)
return (quota ! #origin)
when (not dry) $
S.deleteFrom_ cookies (by whitelist)
return (n, nub bad)
S.deleteFrom_ quotaOrigins (by whitelist)
return (length bad, nub bad)
where
-- check if quota is not whitelisted
by whitelist quota = S.not_ (S.true `S.isIn` matches)