10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-06-21 20:52:06 +02:00
This commit is contained in:
Anthony Scemama 2019-07-31 15:07:04 +02:00
parent b0fa735311
commit 35a083f6f3
5 changed files with 11 additions and 16 deletions

View File

@ -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 ] ""
)

View File

@ -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 ;

View File

@ -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 (

View File

@ -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
)

View File

@ -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;