From ca1420c9a527be17247d2bc305f8aa8da82dcc3d Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Wed, 23 Oct 2024 12:57:58 +0100 Subject: [PATCH] stricter --- src/Simplex/Messaging/Server/MsgStore/Journal.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Messaging/Server/MsgStore/Journal.hs b/src/Simplex/Messaging/Server/MsgStore/Journal.hs index 6c7fc954a..b6549abe3 100644 --- a/src/Simplex/Messaging/Server/MsgStore/Journal.hs +++ b/src/Simplex/Messaging/Server/MsgStore/Journal.hs @@ -248,10 +248,11 @@ instance MsgStoreClass JournalMsgStore where where listDirs = fmap catMaybes . mapM queuePath =<< listDirectory path queuePath dir = do - let path' = path dir + let !path' = path dir + !queueId' = queueId <> dir ifM (doesDirectoryExist path') - (pure $ Just (queueId <> dir, path')) + (pure $ Just (queueId', path')) (Nothing <$ putStrLn ("Error: path " <> path' <> " is not a directory, skipping")) logQueueStates :: JournalMsgStore -> IO ()