mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
ocaml: Replace Filename.temp_dir_name with get_temp_dir_name.
This was deprecated and replaced in OCaml >= 4.00.
This commit is contained in:
@@ -54,7 +54,7 @@ end
|
||||
module Mkdtemp = struct
|
||||
external mkdtemp : string -> string = "guestfs_int_mllib_mkdtemp"
|
||||
|
||||
let temp_dir ?(base_dir = Filename.temp_dir_name) prefix =
|
||||
let temp_dir ?(base_dir = Filename.get_temp_dir_name ()) prefix =
|
||||
mkdtemp (Filename.concat base_dir (prefix ^ "XXXXXX"))
|
||||
end
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ module Mkdtemp : sig
|
||||
|
||||
The optional [~base_dir:string] changes the base directory where
|
||||
to create the new temporary directory; if not specified, the default
|
||||
[Filename.temp_dir_name] is used. *)
|
||||
{!Filename.get_temp_dir_name} is used. *)
|
||||
end
|
||||
|
||||
module Realpath : sig
|
||||
|
||||
@@ -71,7 +71,7 @@ let run indisk outdisk check_tmpdir compress convert
|
||||
(* Use TMPDIR or --tmp parameter? *)
|
||||
let tmp_place =
|
||||
match tmp_param with
|
||||
| None -> Directory Filename.temp_dir_name (* $TMPDIR or /tmp *)
|
||||
| None -> Directory (Filename.get_temp_dir_name ()) (* $TMPDIR or /tmp *)
|
||||
| Some dir when is_directory dir -> Directory dir
|
||||
| Some dev when is_block_device dev -> Block_device dev
|
||||
| Some file when String.is_prefix file "prebuilt:" ->
|
||||
|
||||
Reference in New Issue
Block a user