(candidates: &[PathBuf], source: &str)
| 177 | } |
| 178 | |
| 179 | fn check_candidates(candidates: &[PathBuf], source: &str) -> Option<String> { |
| 180 | for candidate in candidates { |
| 181 | if is_valid_mobile_web_dir(candidate) { |
| 182 | if let Ok(abs) = candidate.canonicalize() { |
| 183 | log::info!("Detected mobile-web dir ({}): {}", source, abs.display()); |
| 184 | return Some(abs.to_string_lossy().into_owned()); |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | None |
| 189 | } |
| 190 | |
| 191 | fn is_valid_mobile_web_dir(dir: &std::path::Path) -> bool { |
| 192 | dir.join("index.html").exists() && dir.join("assets").is_dir() |
no test coverage detected