Ensure parsed rewriters are actually files.
1 files changed, 7 insertions(+), 4 deletions(-) M src/Network/URI/PlugIns/Rewriters.hs
M src/Network/URI/PlugIns/Rewriters.hs => src/Network/URI/PlugIns/Rewriters.hs +7 -4
@@ 38,10 38,13 @@ parseRewriters app = do loadRewriters dir = do files <- Dir.listDirectory dir raw <- forConcurrently files $ \file -> do rewriter <- parseRewriter file return $ case rewriter of Select x -> x Pipe x -> x exists <- doesFileExist file if exists then do rewriter <- parseRewriter file return $ case rewriter of Select x -> x Pipe x -> x else return [] return $ concat raw applyRewriter :: Rewriter -> URI -> Maybe URI