Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote and escape special chars in mapping fs #206

Merged
merged 2 commits into from Nov 2, 2023

Commits on Nov 2, 2023

  1. Quote and escape special chars in mapping keys

    Previously, a mapping key could not include spaces because of the data
    type.  Some implementations of autofs do support such keys when they are
    properly quoted so do not limit their use with the module and properly
    quote the key when it has special characters.
    
    These chars still need to be manualy espaced when used with the fs
    parameter because it is managed as a single String. This will be
    addressed in a follow-up commit as it will be a breaking change.
    smortex committed Nov 2, 2023
    Copy the full SHA
    71da422 View commit details
    Browse the repository at this point in the history
  2. Quote and escape special chars in mapping fs

    Multiple filesystems can be provided for a mapping by separating them
    with spaces.  Some implementations of autofs do support spaces in path
    if proper quoting is in place.
    
    When managing a filesystems with spaces in its path, the end-user of
    the module was responsible for the correct quoting because the module
    interface only accept a single string for the "raw" value.
    
    Change the data type of the parameter to accept either a `String`
    (single filesystem) or an `Array[String]` (multiple filesystems) and
    transfer the responsibility of escaping to the module.
    
    This is a breaking change that may affect some users:
    
    1. Users of mapping with multiple filesystems will need to split their
       `fs` parameter to provide an array of filesystems;
    2. Users of mappings with quoted special chars will have to remove the
       quoting to avoid double-quoting.
    smortex committed Nov 2, 2023
    Copy the full SHA
    66cecb5 View commit details
    Browse the repository at this point in the history