From 33010d7fafe3d05b98cecd85413c96d4cefeeec2 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Thu, 15 Feb 2024 22:42:03 +0000 Subject: [PATCH] Translate /etc/fstab --- src/state/opamSysInteract.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/state/opamSysInteract.ml b/src/state/opamSysInteract.ml index b5cc06484b3..262aab4aa74 100644 --- a/src/state/opamSysInteract.ml +++ b/src/state/opamSysInteract.ml @@ -279,17 +279,17 @@ module Cygwin = struct let set_fstab_noacl = let orig = "binary," in let re = Re.compile (Re.str orig) in - fun () -> - let file = OpamFilename.of_string "/etc/fstab" in - let content = OpamFilename.read file in + fun fstab -> + let content = OpamFilename.read fstab in let content = Re.replace_string re ~by:("noacl,"^orig) content in - OpamFilename.with_open_out_bin_atomic file + OpamFilename.with_open_out_bin_atomic fstab (fun oc -> Stdlib.output_string oc content) let install ~packages = let open OpamProcess.Job.Op in let cygwin_root = internal_cygroot () in let cygwin_bin = cygwin_root / "bin" in + let fstab = cygwin_root / "etc" // "fstab" in let cygcheck = cygwin_bin // cygcheckexe in let local_cygwin_setupexe = cygsetup () in if OpamFilename.exists cygcheck then @@ -327,7 +327,7 @@ module Cygwin = struct (OpamFilename.to_string local_cygwin_setupexe) args @@> fun r -> OpamSystem.raise_on_process_error r; - set_fstab_noacl (); + set_fstab_noacl fstab; Done ()); cygcheck