packages feed

mighttpd2 2.8.7 → 2.8.8

raw patch · 3 files changed

+16/−8 lines, 3 filesnew-component:exe:mighty-mkindex

Files

mighttpd2.cabal view
@@ -1,5 +1,5 @@ Name:                   mighttpd2-Version:                2.8.7+Version:                2.8.8 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3@@ -86,7 +86,7 @@                         Utils                         Paths_mighttpd2 -Executable mkindex+Executable mighty-mkindex   HS-Source-Dirs:       utils, src   Main-Is:              mkindex.hs   GHC-Options:          -Wall
src/FileCache.hs view
@@ -29,7 +29,9 @@     sfile = pathString path     register = do         fs <- getFileStatus sfile-        if not (isDirectory fs) then+        let regular = not (isDirectory fs)+            readable = fileMode fs `intersectFileModes` ownerReadMode /= 0+        if regular && readable then             positive ref fs path           else             goNext
src/Mighty.hs view
@@ -33,7 +33,7 @@ main = do     (opt,route) <- getOptRoute     checkTLS opt-    let reportFile = opt_report_file opt+    let reportFile = reportFileName opt     rpt <- initReporter reportFile >>= checkReporter reportFile     if opt_debug_mode opt then         server opt route rpt@@ -64,10 +64,16 @@       where         n = length args     getAbsoluteFile file-        | isAbsolute file = return file-        | otherwise       = do-            dir <- getCurrentDirectory-            return $ dir </> normalise file+      | isAbsolute file = return file+      | otherwise       = do+          dir <- getCurrentDirectory+          return $ dir </> normalise file+    reportFileName opt+      | port == 80 = rfile+      | otherwise  = rfile ++ show port+      where+        rfile = opt_report_file opt+        port = opt_port opt     checkReporter _          (Right rpt) = return rpt     checkReporter reportFile (Left e)    = do         hPutStrLn stderr $ reportFile ++ " is not writable"