]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/getter/clientHTTP.ml
bugfix: use temporary file name to avoid file access clashes when the
[helm.git] / helm / ocaml / getter / clientHTTP.ml
index 4d5488c00de0766a2382d9489548c7e70b94a1ee..2444bded35afc1eab918c5a118b477f4a8be5bd4 100644 (file)
@@ -54,7 +54,11 @@ let get_and_save_to_tmp uri =
    done ;
    cs
  in
-  let tmp_file = Configuration.tmp_dir ^ "/" ^ (flat_string uri ".-=:;!?/&" '_') in
+  let user = try Unix.getlogin () with _ -> "" in
+  let tmp_file =
+    Filename.temp_file (user ^ flat_string uri ".-=:;!?/&" '_') ""
+  in
   get_and_save uri tmp_file ;
   tmp_file
 ;;
+