Skip to content

Commit

Permalink
One more sort for #1684
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Jul 4, 2020
1 parent 084a3ce commit 7964967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yesod-static/Yesod/Static.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7964967

Please sign in to comment.