diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-03-19 11:31:02 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-03-19 11:31:02 +0100 |
commit | 85252f8ab8fcf45b29bec76d140ec5bc067e609f (patch) | |
tree | 726313e30c43a2153390672f150e4922b2720ab0 /src | |
parent | 969d6687e582f52930f1158b6cd87dd3fc27dd65 (diff) | |
download | hakyll-85252f8ab8fcf45b29bec76d140ec5bc067e609f.tar.gz |
Fix filepath-1.2 issue in toSiteRoot
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll/Web/Util/Url.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Hakyll/Web/Util/Url.hs b/src/Hakyll/Web/Util/Url.hs index a0702d8..7ab6717 100644 --- a/src/Hakyll/Web/Util/Url.hs +++ b/src/Hakyll/Web/Util/Url.hs @@ -25,9 +25,11 @@ toUrl url = '/' : url -- toSiteRoot :: String -> String toSiteRoot = emptyException . joinPath . map parent - . splitPath . takeDirectory . dropLeadingSlash + . filter relevant . splitPath . takeDirectory where parent = const ".." emptyException [] = "." emptyException x = x - dropLeadingSlash = dropWhile (== '/') + relevant "." = False + relevant "/" = False + relevant _ = True |