Join `base` and a key relative to its S3 prefix into a workspace-relative [`WorkspacePath`]. Handles the "base is root" case so the result does not start with `./`.
(base: &WorkspacePath, rel: &str)
| 966 | /// [`WorkspacePath`]. Handles the "base is root" case so the result does not |
| 967 | /// start with `./`. |
| 968 | fn join_workspace_path(base: &WorkspacePath, rel: &str) -> WorkspacePath { |
| 969 | if base.is_root() { |
| 970 | WorkspacePath::from_normalized(rel) |
| 971 | } else { |
| 972 | WorkspacePath::from_normalized(format!("{}/{}", base.as_str(), rel)) |
| 973 | } |
| 974 | } |
| 975 | |
| 976 | /// Last segment of a slash-separated key, used to apply filename-only glob |
| 977 | /// filters in `grep` (matches `ignore::types` semantics from the local |