Skip to content
Snippets Groups Projects
Commit 795ebdcb authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[server] don't try to re-create an existing directory

parent 838b709a
No related branches found
No related tags found
No related merge requests found
...@@ -164,7 +164,7 @@ let metadata page : json = ...@@ -164,7 +164,7 @@ let metadata page : json =
let pp_one_page ~root ~page ~title body = let pp_one_page ~root ~page ~title body =
let full_path = Filepath.normalize (root ^ "/" ^ page) in let full_path = Filepath.normalize (root ^ "/" ^ page) in
let dir = Filename.dirname full_path in let dir = Filename.dirname full_path in
Extlib.mkdir ~parents:true dir 0o755; if not (Sys.file_exists dir) then Extlib.mkdir ~parents:true dir 0o755;
try try
let chan = open_out full_path in let chan = open_out full_path in
let fmt = Format.formatter_of_out_channel chan in let fmt = Format.formatter_of_out_channel chan in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment