File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -192,12 +192,8 @@ fn clean_specs(
192192
193193 clean_ctx. progress = Box :: new ( CleaningPackagesBar :: new ( clean_ctx. gctx , packages. len ( ) ) ) ;
194194
195- {
196- // Try to reduce the amount of times we iterate over the same target directory by storing away
197- // the directories we've iterated over (and cleaned for a given package).
198- let mut cleaned_packages: HashMap < _ , HashSet < _ > > = HashMap :: default ( ) ;
195+ if clean_ctx. gctx . cli_unstable ( ) . build_dir_new_layout {
199196 for pkg in packages {
200- let pkg_dir = format ! ( "{}-*" , pkg. name( ) ) ;
201197 clean_ctx. progress . on_cleaning_package ( & pkg. name ( ) ) ?;
202198
203199 if clean_ctx. gctx . cli_unstable ( ) . build_dir_new_layout {
@@ -247,6 +243,14 @@ fn clean_specs(
247243 }
248244 continue ;
249245 }
246+ }
247+ } else {
248+ // Try to reduce the amount of times we iterate over the same target directory by storing away
249+ // the directories we've iterated over (and cleaned for a given package).
250+ let mut cleaned_packages: HashMap < _ , HashSet < _ > > = HashMap :: default ( ) ;
251+ for pkg in packages {
252+ let pkg_dir = format ! ( "{}-*" , pkg. name( ) ) ;
253+ clean_ctx. progress . on_cleaning_package ( & pkg. name ( ) ) ?;
250254
251255 // Clean fingerprints.
252256 for ( _, layout) in & layouts_with_host {
You can’t perform that action at this time.
0 commit comments