mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-11-07 06:33:38 +01:00
Bugfix
This commit is contained in:
parent
b0fa735311
commit
35a083f6f3
@ -69,6 +69,9 @@ let dir_name = lazy(
|
||||
let md5 =
|
||||
QmcMd5.hash ()
|
||||
in
|
||||
let d = Filename.concat ezfio_filename "blocks" in
|
||||
if not ( Sys.file_exists d ) then
|
||||
Unix.mkdir d 0o755;
|
||||
List.fold_right Filename.concat
|
||||
[ ezfio_filename ; "blocks" ; md5 ; Filename.dir_sep ] ""
|
||||
)
|
||||
|
@ -10,7 +10,7 @@ let input_directory = lazy (
|
||||
in
|
||||
|
||||
begin
|
||||
if not (Sys.file_exists dirname && Sys.is_directory dirname) then
|
||||
if not (Sys.file_exists dirname) then
|
||||
Unix.mkdir dirname 0o777
|
||||
end ;
|
||||
|
||||
|
@ -347,7 +347,7 @@ let run ?(daemon=true) ezfio_filename =
|
||||
Lazy.force Block.dir_name
|
||||
in
|
||||
let () =
|
||||
if not ( Sys.file_exists dirname && Sys.is_directory dirname ) then
|
||||
if not ( Sys.file_exists dirname ) then
|
||||
Unix.mkdir dirname 0o755
|
||||
in
|
||||
Filename.concat dirname (
|
||||
|
@ -46,18 +46,6 @@ let ezfio_filename = lazy (
|
||||
in
|
||||
set_ezfio_filename full_path;
|
||||
|
||||
(*
|
||||
(* Check if input directory is present *)
|
||||
let dirname = Filename.concat full_path "input" in
|
||||
if not (Sys.file_exists dirname) then
|
||||
Unix.mkdir dirname 0o755;
|
||||
|
||||
(* Check if blocks directory is present *)
|
||||
let dirname = Filename.concat full_path "blocks" in
|
||||
if not (Sys.file_exists dirname) then
|
||||
Unix.mkdir dirname 0o755;
|
||||
*)
|
||||
|
||||
!Ezfio.ezfio_filename
|
||||
)
|
||||
|
||||
|
@ -680,9 +680,13 @@ let compress_files () =
|
||||
|
||||
let out_channel_dir =
|
||||
let rand_num = Random.int 1000000 |> string_of_int in
|
||||
let dirname =
|
||||
Filename.concat !Ezfio.ezfio_filename "blocks"
|
||||
in
|
||||
if not ( Sys.file_exists dirname ) then
|
||||
Unix.mkdir dirname 0o755;
|
||||
let tmp_dir =
|
||||
Filename.concat !Ezfio.ezfio_filename @@
|
||||
Filename.concat "blocks" "qmc"^rand_num
|
||||
Filename.concat dirname ("qmc"^rand_num)
|
||||
in
|
||||
try
|
||||
Unix.mkdir tmp_dir 0o755;
|
||||
|
Loading…
Reference in New Issue
Block a user