Skip to content

Commit

Permalink
add fallback to homeDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Dec 29, 2015
1 parent 7f4496b commit b23fa0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Suave.Razor/Library.fs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ module Razor =
match paths with
| h :: _ -> (h @@ item) :: paths
| _ -> [ item ]) []
|> Seq.map (resolveView r)
|> Seq.toList
@ [ resolvePath r.runtime.homeDirectory "." |> Path.GetFullPath ]

let serviceConfiguration = TemplateServiceConfiguration()
// generate compiled templates in memory instead of on disk as temporary files
Expand All @@ -88,7 +90,6 @@ module Razor =
|> Seq.collect (fun path ->
pathsWithExtension
|> Seq.map (fun pathWithExtension -> path @@ pathWithExtension))
|> Seq.map (resolveView r)
|> Seq.filter File.Exists
|> Seq.tryFind (fun _ -> true)
// |> Seq.tryHead // F# 4
Expand Down

0 comments on commit b23fa0a

Please sign in to comment.