Skip to content

Commit 009db41

Browse files
committed
add diff support for reconversions in convert-roms
1 parent 1683f5c commit 009db41

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

src/convert_roms.rs

+54
Original file line numberDiff line numberDiff line change
@@ -1734,6 +1734,15 @@ async fn to_chd(
17341734
chd_romfile.as_common()?.delete(progress_bar, false).await?;
17351735
continue;
17361736
} else {
1737+
if diff {
1738+
print_diff(
1739+
progress_bar,
1740+
&roms.iter().collect::<Vec<&Rom>>(),
1741+
&[&romfile.path],
1742+
&[&chd_romfile.path],
1743+
)
1744+
.await?;
1745+
}
17371746
romfile.as_common()?.delete(progress_bar, false).await?;
17381747
chd_romfile
17391748
.as_common()?
@@ -1798,6 +1807,15 @@ async fn to_chd(
17981807
chd_romfile.as_common()?.delete(progress_bar, false).await?;
17991808
continue;
18001809
} else {
1810+
if diff {
1811+
print_diff(
1812+
progress_bar,
1813+
&roms.iter().collect::<Vec<&Rom>>(),
1814+
&[&romfile.path],
1815+
&[&chd_romfile.path],
1816+
)
1817+
.await?;
1818+
}
18011819
romfile.as_common()?.delete(progress_bar, false).await?;
18021820
chd_romfile
18031821
.as_common()?
@@ -2134,6 +2152,15 @@ async fn to_cso(
21342152
cso_romfile.as_common()?.delete(progress_bar, false).await?;
21352153
continue;
21362154
} else {
2155+
if diff {
2156+
print_diff(
2157+
progress_bar,
2158+
&roms.iter().collect::<Vec<&Rom>>(),
2159+
&[&romfile.path],
2160+
&[&cso_romfile.path],
2161+
)
2162+
.await?;
2163+
}
21372164
romfile.as_common()?.delete(progress_bar, false).await?;
21382165
cso_romfile
21392166
.as_common()?
@@ -2340,6 +2367,15 @@ async fn to_nsz(
23402367
nsz_romfile.as_common()?.delete(progress_bar, false).await?;
23412368
continue;
23422369
} else {
2370+
if diff {
2371+
print_diff(
2372+
progress_bar,
2373+
&roms.iter().collect::<Vec<&Rom>>(),
2374+
&[&romfile.path],
2375+
&[&nsz_romfile.path],
2376+
)
2377+
.await?;
2378+
}
23432379
romfile.as_common()?.delete(progress_bar, false).await?;
23442380
nsz_romfile
23452381
.as_common()?
@@ -2567,6 +2603,15 @@ async fn to_rvz(
25672603
rvz_romfile.as_common()?.delete(progress_bar, false).await?;
25682604
continue;
25692605
} else {
2606+
if diff {
2607+
print_diff(
2608+
progress_bar,
2609+
&roms.iter().collect::<Vec<&Rom>>(),
2610+
&[&romfile.path],
2611+
&[&rvz_romfile.path],
2612+
)
2613+
.await?;
2614+
}
25702615
romfile.as_common()?.delete(progress_bar, false).await?;
25712616
rvz_romfile
25722617
.as_common()?
@@ -2903,6 +2948,15 @@ async fn to_zso(
29032948
zso_romfile.as_common()?.delete(progress_bar, false).await?;
29042949
continue;
29052950
} else {
2951+
if diff {
2952+
print_diff(
2953+
progress_bar,
2954+
&roms.iter().collect::<Vec<&Rom>>(),
2955+
&[&romfile.path],
2956+
&[&zso_romfile.path],
2957+
)
2958+
.await?;
2959+
}
29062960
romfile.as_common()?.delete(progress_bar, false).await?;
29072961
zso_romfile
29082962
.as_common()?

0 commit comments

Comments
 (0)