mirror of https://github.com/encounter/objdiff.git
Call `resolve_paths` in slightly fewer cases
This commit is contained in:
parent
834ba3d3af
commit
788ece1fdb
|
@ -78,9 +78,8 @@ pub fn run(args: Args) -> Result<()> {
|
||||||
PathBuf::from_str(u).ok().and_then(|p| fs::canonicalize(p).ok());
|
PathBuf::from_str(u).ok().and_then(|p| fs::canonicalize(p).ok());
|
||||||
|
|
||||||
let Some(object) = project_config.objects.iter_mut().find_map(|obj| {
|
let Some(object) = project_config.objects.iter_mut().find_map(|obj| {
|
||||||
resolve_paths(obj);
|
|
||||||
|
|
||||||
if obj.name.as_deref() == Some(u) {
|
if obj.name.as_deref() == Some(u) {
|
||||||
|
resolve_paths(obj);
|
||||||
return Some(obj);
|
return Some(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +87,8 @@ pub fn run(args: Args) -> Result<()> {
|
||||||
return None;
|
return None;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
resolve_paths(obj);
|
||||||
|
|
||||||
if [&obj.base_path, &obj.target_path]
|
if [&obj.base_path, &obj.target_path]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|p| p.as_ref().and_then(|p| p.canonicalize().ok()))
|
.filter_map(|p| p.as_ref().and_then(|p| p.canonicalize().ok()))
|
||||||
|
|
Loading…
Reference in New Issue