Skip to content

Commit 88536ed

Browse files
hgouraudsagotch
authored andcommitted
Create wiznotes folder only when necessary
1 parent 2a8e879 commit 88536ed

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

bin/gwc/db1link.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,8 +1222,6 @@ let write_file_contents fname text =
12221222

12231223
let output_wizard_notes bdir wiznotes =
12241224
let wizdir = Filename.concat bdir "wiznotes" in
1225-
Mutil.remove_dir wizdir;
1226-
Unix.mkdir wizdir 0o755 ;
12271225
if wiznotes <> [] then begin
12281226
List.iter begin fun (wizid, text) ->
12291227
let fname = Filename.concat wizdir wizid ^ ".txt" in

lib/wiznotesDisplay.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ let connected_wizards conf base =
634634

635635
let do_change_wizard_visibility conf base x set_vis =
636636
let wddir = dir conf base in
637+
if not @@ Sys.file_exists wddir then Unix.mkdir wddir 0o755;
637638
let denying = wizard_denying wddir in
638639
let is_visible = not (List.mem conf.user denying) in
639640
if not set_vis && not is_visible || set_vis && is_visible then ()

0 commit comments

Comments
 (0)