From 56f733ebfb3aaf3cfd5ceb4e4a7240a5697a81c0 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 11 Oct 2024 15:31:48 +0200 Subject: fix DELETE --- src/Store/Query.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Store/Query.hs b/src/Store/Query.hs index 2b86c82..8cef050 100644 --- a/src/Store/Query.hs +++ b/src/Store/Query.hs @@ -27,11 +27,10 @@ query :: Query -> S.StoreM [J.Value] query (Delete c w) = do c' <- mapM (\fn -> fmap ((fn,) . fromValue c) . decodeFile c $ fn) - . map (c ) =<< S.listFiles c let fps = map fst $ whereBy snd w (map (second (: [])) c') lift $ print fps - mapM_ S.deleteFile fps + mapM_ S.deleteFile (map (c ) fps) S.commit pure [] query (Insert vs c) = do -- cgit v1.2.3