Compute the tar entry prefix for a directory upload. Returns the directory's basename for any path with a meaningful basename; callers extracting at ` ` will see contents wrapped under ` / /...`. Returns `"."` for paths without a basename (e.g. `.` or `/`), which produces flat extraction at ` `.
(local_path: &Path)
| 1043 | /// `<dest>/<basename>/...`. Returns `"."` for paths without a basename |
| 1044 | /// (e.g. `.` or `/`), which produces flat extraction at `<dest>`. |
| 1045 | fn directory_upload_prefix(local_path: &Path) -> std::ffi::OsString { |
| 1046 | local_path |
| 1047 | .file_name() |
| 1048 | .map_or_else(|| ".".into(), std::ffi::OsStr::to_os_string) |
| 1049 | } |
| 1050 | |
| 1051 | fn file_list_archive_prefix(local_path: &Path) -> Option<PathBuf> { |
| 1052 | if !local_path.is_dir() { |
no outgoing calls
no test coverage detected