From 7964967ba8edb495d0eafbca2820803049fcc38d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 4 Jul 2020 19:09:50 +0300 Subject: [PATCH] One more sort for #1684 --- yesod-static/Yesod/Static.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yesod-static/Yesod/Static.hs b/yesod-static/Yesod/Static.hs index e426f62d..f8a9ed79 100644 --- a/yesod-static/Yesod/Static.hs +++ b/yesod-static/Yesod/Static.hs @@ -71,7 +71,7 @@ import Data.FileEmbed (embedDir) import Yesod.Core import Yesod.Core.Types -import Data.List (intercalate) +import Data.List (intercalate, sort) import Language.Haskell.TH import Language.Haskell.TH.Syntax as TH @@ -192,7 +192,7 @@ getFileListPieces = flip evalStateT M.empty . flip go id -> ([String] -> [String]) -> StateT (M.Map String String) IO [[String]] go fp front = do - allContents <- liftIO $ filter notHidden `fmap` getDirectoryContents fp + allContents <- liftIO $ (sort . filter notHidden) `fmap` getDirectoryContents fp let fullPath :: String -> String fullPath f = fp ++ '/' : f files <- liftIO $ filterM (doesFileExist . fullPath) allContents