Encode the OCI whiteout entry name for a deleted path.
(path: &str)
| 286 | |
| 287 | /// Encode the OCI whiteout entry name for a deleted path. |
| 288 | fn whiteout_path(path: &str) -> String { |
| 289 | match path.rfind('/') { |
| 290 | Some(idx) => format!("{}/.wh.{}", &path[..idx], &path[idx + 1..]), |
| 291 | None => format!(".wh.{path}"), |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | /// Strip the `sha256:` prefix from a digest, yielding the bare hex used as a |
| 296 | /// blob filename. |
no outgoing calls
no test coverage detected