mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-08-29 22:33:41 +02:00
Fixing small bugs
This commit is contained in:
parent
f7ffed3a5a
commit
b0fa735311
@ -392,7 +392,10 @@ let run ?(daemon=true) ezfio_filename =
|
||||
Unix.rename block_channel_filename_locked block_channel_filename_tmp;
|
||||
Random_variable.compress_files ();
|
||||
send_log "status" 0 t0 "Compressed block file";
|
||||
block_channel := open_out_gen [ Open_append ] 0o660 block_channel_filename_locked
|
||||
if Sys.file_exists block_channel_filename_locked then
|
||||
block_channel := open_out_gen [ Open_append ] 0o660 block_channel_filename_locked
|
||||
else
|
||||
block_channel := open_out block_channel_filename_locked
|
||||
in
|
||||
|
||||
|
||||
|
@ -681,14 +681,15 @@ let compress_files () =
|
||||
let out_channel_dir =
|
||||
let rand_num = Random.int 1000000 |> string_of_int in
|
||||
let tmp_dir =
|
||||
Filename.concat "!Ezfio.ezfio_filename" @@
|
||||
Filename.concat "blocks" @@
|
||||
Filename.concat "qmc" rand_num
|
||||
Filename.concat !Ezfio.ezfio_filename @@
|
||||
Filename.concat "blocks" "qmc"^rand_num
|
||||
in
|
||||
try
|
||||
Unix.mkdir tmp_dir 0o755;
|
||||
tmp_dir
|
||||
with _ -> raise (Sys_error "Cannot create temp dir")
|
||||
with _ ->
|
||||
let message = Printf.sprintf "Cannot create temp dir %s" tmp_dir in
|
||||
raise (Sys_error message)
|
||||
in
|
||||
|
||||
let out_channel_name =
|
||||
|
Loading…
Reference in New Issue
Block a user