|
@@ -437,7 +437,7 @@ impl AppBundle {
|
|
|
}
|
|
|
|
|
|
let asset_count = assets_to_transfer.len();
|
|
|
- let assets_finished = AtomicUsize::new(0);
|
|
|
+ let current_asset = AtomicUsize::new(0);
|
|
|
|
|
|
// Parallel Copy over the assets and keep track of progress with an atomic counter
|
|
|
let progress = self.build.progress.clone();
|
|
@@ -448,7 +448,7 @@ impl AppBundle {
|
|
|
.try_for_each(|(from, to, options)| {
|
|
|
tracing::trace!(
|
|
|
"Starting asset copy {current}/{asset_count} from {from:?}",
|
|
|
- current = assets_finished.fetch_add(0, std::sync::atomic::Ordering::SeqCst),
|
|
|
+ current = current_asset.fetch_add(1, std::sync::atomic::Ordering::SeqCst),
|
|
|
);
|
|
|
|
|
|
let res = process_file_to(options, from, to);
|
|
@@ -459,7 +459,7 @@ impl AppBundle {
|
|
|
|
|
|
BuildRequest::status_copied_asset(
|
|
|
&progress,
|
|
|
- assets_finished.fetch_add(1, std::sync::atomic::Ordering::SeqCst) + 1,
|
|
|
+ current_asset.fetch_add(0, std::sync::atomic::Ordering::SeqCst),
|
|
|
asset_count,
|
|
|
from.to_path_buf(),
|
|
|
);
|