(project_dir: &Path, args: &[String])
| 174 | } |
| 175 | |
| 176 | fn resolve_content_root(project_dir: &Path, args: &[String]) -> Result<PathBuf, String> { |
| 177 | if let Some(raw_dlc) = parse_flag_value(args, "--dlc") { |
| 178 | let dlc = validate_dlc_name(&raw_dlc)?; |
| 179 | return Ok(project_dir.join("dlcs").join(dlc)); |
| 180 | } |
| 181 | |
| 182 | let res_root = project_dir.join("res"); |
| 183 | if !res_root.exists() { |
| 184 | return Err(format!("res directory not found at {}", res_root.display())); |
| 185 | } |
| 186 | Ok(res_root) |
| 187 | } |
| 188 | |
| 189 | fn resolve_content_prefix(args: &[String]) -> Result<String, String> { |
| 190 | if let Some(raw_dlc) = parse_flag_value(args, "--dlc") { |
no test coverage detected