()
| 2255 | } |
| 2256 | |
| 2257 | fn current_simdeck_executable_path() -> anyhow::Result<PathBuf> { |
| 2258 | if let Some(arg0) = env::args_os().next().filter(|value| !value.is_empty()) { |
| 2259 | let path = PathBuf::from(arg0); |
| 2260 | let candidate = if path.is_absolute() { |
| 2261 | path |
| 2262 | } else { |
| 2263 | env::current_dir() |
| 2264 | .context("resolve current directory")? |
| 2265 | .join(path) |
| 2266 | }; |
| 2267 | if candidate.exists() { |
| 2268 | return Ok(candidate); |
| 2269 | } |
| 2270 | } |
| 2271 | env::current_exe().context("resolve simdeck executable") |
| 2272 | } |
| 2273 | |
| 2274 | fn paths_refer_to_same_file(left: &Path, right: &Path) -> bool { |
| 2275 | if left == right { |
no test coverage detected