Commit 7e2aec07 authored by Atemu's avatar Atemu
Browse files

nixos/filesystems: escape mount options in fstab

Some mount options might include path names and those often contain spaces and
therefore must be escaped. An example which prompted me to make this change is
the path of a btrfs subvolume.
parent 104e8082
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ let
         else throw "No device specified for mount point ‘${fs.mountPoint}’.")
      + " " + escape (rootPrefix + fs.mountPoint)
      + " " + fs.fsType
      + " " + builtins.concatStringsSep "," (fs.options ++ (extraOpts fs))
      + " " + escape (builtins.concatStringsSep "," (fs.options ++ (extraOpts fs)))
      + " " + (optionalString (!excludeChecks)
        ("0 " + (if skipCheck fs then "0" else if fs.mountPoint == "/" then "1" else "2")))
      + "\n"