avoid explosion on people adding abs-path mount

This commit is contained in:
Mirek Kratochvil 2023-06-08 15:03:11 +02:00
parent 384e56cb53
commit dc128cbe0e

View file

@ -66,7 +66,9 @@ loadPage fp = do
md <- io $ runIOorExplode $ readMarkdown markdownReadOpts (T.drop 5 markdown)
{- find the main mount point for the page -}
let mount =
T.unpack . just ("mount point of " ++ fp) $ yml ^? key "mount" . _String
dropWhile (== '/') . T.unpack . just ("mount point of " ++ fp) $ yml ^?
key "mount" .
_String
existing <- use $ pages . to (M.!? mount)
case existing of
Just pi ->