summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-03-19 11:31:02 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-03-19 11:31:02 +0100
commit85252f8ab8fcf45b29bec76d140ec5bc067e609f (patch)
tree726313e30c43a2153390672f150e4922b2720ab0 /src
parent969d6687e582f52930f1158b6cd87dd3fc27dd65 (diff)
downloadhakyll-85252f8ab8fcf45b29bec76d140ec5bc067e609f.tar.gz
Fix filepath-1.2 issue in toSiteRoot
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Web/Util/Url.hs6
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