fix: asset copy counter
This commit is contained in:
1 file changed
+3
-3
@@ -437,7 +437,7 @@ impl AppBundle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let asset_count = assets_to_transfer.len();
|
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
|
// Parallel Copy over the assets and keep track of progress with an atomic counter
|
||||||
let progress = self.build.progress.clone();
|
let progress = self.build.progress.clone();
|
||||||
@@ -448,7 +448,7 @@ impl AppBundle {
|
|||||||
.try_for_each(|(from, to, options)| {
|
.try_for_each(|(from, to, options)| {
|
||||||
tracing::trace!(
|
tracing::trace!(
|
||||||
"Starting asset copy {current}/{asset_count} from {from:?}",
|
"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);
|
let res = process_file_to(options, from, to);
|
||||||
@@ -459,7 +459,7 @@ impl AppBundle {
|
|||||||
|
|
||||||
BuildRequest::status_copied_asset(
|
BuildRequest::status_copied_asset(
|
||||||
&progress,
|
&progress,
|
||||||
assets_finished.fetch_add(1, std::sync::atomic::Ordering::SeqCst) + 1,
|
current_asset.fetch_add(0, std::sync::atomic::Ordering::SeqCst),
|
||||||
asset_count,
|
asset_count,
|
||||||
from.to_path_buf(),
|
from.to_path_buf(),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user