From 8069d42d90bb6b3e42a4304bcc89ac7b8f39c2b2 Mon Sep 17 00:00:00 2001 From: David Hewson Date: Fri, 7 Aug 2020 13:22:55 +0100 Subject: [PATCH] use globFilePackage in widgetFileReload and widgetFileNoReload this will mean that files can be build from another directory whilst still finding the package's templates --- yesod/Yesod/Default/Util.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod/Yesod/Default/Util.hs b/yesod/Yesod/Default/Util.hs index f0f1ef82..6e3f21a4 100644 --- a/yesod/Yesod/Default/Util.hs +++ b/yesod/Yesod/Default/Util.hs @@ -130,7 +130,7 @@ warnUnlessExists :: Bool -> Bool -- ^ requires toWidget wrap -> String -> (FilePath -> Q Exp) -> Q (Maybe Exp) warnUnlessExists shouldWarn x wrap glob f = do - let fn = globFile glob x + fn <- globFilePackage glob x e <- qRunIO $ doesFileExist fn when (shouldWarn && not e) $ qRunIO $ putStrLn $ "widget file not found: " ++ fn if e