fix(webserver): directory must be absolute

This commit is contained in:
Mahdi Dibaiee 2017-02-22 12:58:34 +03:30
parent 9e8cc30744
commit bff0c6230b

View File

@ -8,6 +8,7 @@ module System.Term ( initialize ) where
import System.Console.CmdArgs
import qualified System.Console.CmdArgs.Explicit as E
import System.Environment
import System.Directory
import Data.Monoid
import Data.Maybe
@ -83,7 +84,9 @@ module System.Term ( initialize ) where
| ssl = "403"
| otherwise = "80"
let params = S.ServerParams { S.directory = directory
absoluteDirectory <- makeAbsolute directory
let params = S.ServerParams { S.directory = absoluteDirectory
, S.domain = domain
, S.port = portNumber
, S.ssl = ssl