- let user = try Sys.getenv "USER" ^ "_" with Not_found -> "" in
- (* FG: Unix.getlogin () should be used instead of the above *)
- let tmp_file = Configuration.tmp_dir ^ "/" ^ user ^ (flat_string uri ".-=:;!?/&" '_') in
+ let user = try Unix.getlogin () with _ -> "" in
+ let tmp_file =
+ Filename.temp_file (user ^ flat_string uri ".-=:;!?/&" '_') ""
+ in