File tree Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -270,23 +270,26 @@ pub fn prepare_submission(
270
270
}
271
271
272
272
log:: debug!( "copying csproj files in clone/*/src" ) ;
273
- for entry in WalkDir :: new ( clone_path. join ( "src" ) )
274
- . min_depth ( 2 )
275
- . max_depth ( 2 )
276
- {
277
- let entry = entry?;
278
- if entry. path ( ) . is_file ( )
279
- && entry
280
- . path ( )
281
- . extension ( )
282
- . map ( |ext| ext == "csproj" )
283
- . unwrap_or_default ( )
273
+ let clone_src = clone_path. join ( "src" ) ;
274
+ if clone_src. exists ( ) {
275
+ for entry in WalkDir :: new ( clone_path. join ( "src" ) )
276
+ . min_depth ( 2 )
277
+ . max_depth ( 2 )
284
278
{
285
- let relative = entry
286
- . path ( )
287
- . strip_prefix ( & clone_path)
288
- . expect ( "always inside clone root" ) ;
289
- file_util:: copy ( entry. path ( ) , dest. join ( relative) ) ?;
279
+ let entry = entry?;
280
+ if entry. path ( ) . is_file ( )
281
+ && entry
282
+ . path ( )
283
+ . extension ( )
284
+ . map ( |ext| ext == "csproj" )
285
+ . unwrap_or_default ( )
286
+ {
287
+ let relative = entry
288
+ . path ( )
289
+ . strip_prefix ( & clone_path)
290
+ . expect ( "always inside clone root" ) ;
291
+ file_util:: copy ( entry. path ( ) , dest. join ( relative) ) ?;
292
+ }
290
293
}
291
294
}
292
295
You can’t perform that action at this time.
0 commit comments