Commit dfaf57ca authored by K900's avatar K900
Browse files

nixos/qbittorrent: escape newlines in config values

parent ba01df3d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ let
    mkIf
    maintainers
    escape
    replaceString
    collect
    mapAttrsRecursive
    optionals
@@ -43,7 +44,9 @@ let
          collect isString (
            mapAttrsRecursive (
              path: value:
              "${escape [ sep ] (concatStringsSep "\\" ([ k ] ++ path))}${sep}${mkValueStringDefault { } value}"
              "${escape [ sep ] (concatStringsSep "\\" ([ k ] ++ path))}${sep}${
                replaceString "\n" "\\n" (mkValueStringDefault { } value)
              }"
            ) v
          )
        )