Skip to content

Commit

Permalink
add diff support for reconversions in convert-roms
Browse files Browse the repository at this point in the history
  • Loading branch information
alucryd committed Apr 1, 2024
1 parent 1683f5c commit 009db41
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/convert_roms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,15 @@ async fn to_chd(
chd_romfile.as_common()?.delete(progress_bar, false).await?;
continue;
} else {
if diff {
print_diff(
progress_bar,
&roms.iter().collect::<Vec<&Rom>>(),
&[&romfile.path],
&[&chd_romfile.path],
)
.await?;
}
romfile.as_common()?.delete(progress_bar, false).await?;
chd_romfile
.as_common()?
Expand Down Expand Up @@ -1798,6 +1807,15 @@ async fn to_chd(
chd_romfile.as_common()?.delete(progress_bar, false).await?;
continue;
} else {
if diff {
print_diff(
progress_bar,
&roms.iter().collect::<Vec<&Rom>>(),
&[&romfile.path],
&[&chd_romfile.path],
)
.await?;
}
romfile.as_common()?.delete(progress_bar, false).await?;
chd_romfile
.as_common()?
Expand Down Expand Up @@ -2134,6 +2152,15 @@ async fn to_cso(
cso_romfile.as_common()?.delete(progress_bar, false).await?;
continue;
} else {
if diff {
print_diff(
progress_bar,
&roms.iter().collect::<Vec<&Rom>>(),
&[&romfile.path],
&[&cso_romfile.path],
)
.await?;
}
romfile.as_common()?.delete(progress_bar, false).await?;
cso_romfile
.as_common()?
Expand Down Expand Up @@ -2340,6 +2367,15 @@ async fn to_nsz(
nsz_romfile.as_common()?.delete(progress_bar, false).await?;
continue;
} else {
if diff {
print_diff(
progress_bar,
&roms.iter().collect::<Vec<&Rom>>(),
&[&romfile.path],
&[&nsz_romfile.path],
)
.await?;
}
romfile.as_common()?.delete(progress_bar, false).await?;
nsz_romfile
.as_common()?
Expand Down Expand Up @@ -2567,6 +2603,15 @@ async fn to_rvz(
rvz_romfile.as_common()?.delete(progress_bar, false).await?;
continue;
} else {
if diff {
print_diff(
progress_bar,
&roms.iter().collect::<Vec<&Rom>>(),
&[&romfile.path],
&[&rvz_romfile.path],
)
.await?;
}
romfile.as_common()?.delete(progress_bar, false).await?;
rvz_romfile
.as_common()?
Expand Down Expand Up @@ -2903,6 +2948,15 @@ async fn to_zso(
zso_romfile.as_common()?.delete(progress_bar, false).await?;
continue;
} else {
if diff {
print_diff(
progress_bar,
&roms.iter().collect::<Vec<&Rom>>(),
&[&romfile.path],
&[&zso_romfile.path],
)
.await?;
}
romfile.as_common()?.delete(progress_bar, false).await?;
zso_romfile
.as_common()?
Expand Down

0 comments on commit 009db41

Please sign in to comment.