Skip to main content

canonicalize_escape_path

Function canonicalize_escape_path 

Source
pub(crate) fn canonicalize_escape_path<W: Write>(
    path: &Path,
    out: &mut W,
) -> Result
Expand description

Canonicalize and escape a path value for tmpfiles.d.

This performs one canonicalization: remapping /var/run -> /run. This is hardcoded because /var/run is itself required to be a symlink pointing out to the real /run (see Error::FoundVarRunNonSymlink). The walker never recurses into /var/run, so this rewrite only ever applies to the top-level entry itself.