@@ -323,7 +323,7 @@ pub fn init(
323
323
324
324
// Check if includes exist
325
325
for path in vendor_package. include_from_upstream . clone ( ) {
326
- if !PathBuf :: from ( extend_paths ( & [ path. clone ( ) ] , dep_path) ?[ 0 ] . clone ( ) ) . exists ( ) {
326
+ if !PathBuf :: from ( extend_paths ( & [ path. clone ( ) ] , dep_path, true ) ?[ 0 ] . clone ( ) ) . exists ( ) {
327
327
warnln ! ( "{} not found in upstream, continuing." , path) ;
328
328
}
329
329
}
@@ -333,7 +333,7 @@ pub fn init(
333
333
true => copy_recursively (
334
334
& link_from,
335
335
& link_to,
336
- & extend_paths ( & vendor_package. include_from_upstream , dep_path) ?,
336
+ & extend_paths ( & vendor_package. include_from_upstream , dep_path, false ) ?,
337
337
& vendor_package
338
338
. exclude_from_upstream
339
339
. clone ( )
@@ -474,6 +474,7 @@ pub fn diff(
474
474
& extend_paths (
475
475
& vendor_package. include_from_upstream ,
476
476
& vendor_package. target_dir ,
477
+ false ,
477
478
) ?,
478
479
& vendor_package
479
480
. exclude_from_upstream
@@ -792,12 +793,13 @@ pub fn copy_recursively(
792
793
pub fn extend_paths (
793
794
include_from_upstream : & [ String ] ,
794
795
prefix : impl AsRef < Path > ,
796
+ dir_only : bool ,
795
797
) -> Result < Vec < String > > {
796
798
include_from_upstream
797
799
. iter ( )
798
800
. map ( |pattern| {
799
801
let pattern_long = PathBuf :: from ( pattern) . prefix_paths ( prefix. as_ref ( ) ) ?;
800
- if pattern_long. is_dir ( ) {
802
+ if pattern_long. is_dir ( ) && !dir_only {
801
803
Ok ( String :: from ( pattern_long. join ( "**" ) . to_str ( ) . unwrap ( ) ) )
802
804
} else {
803
805
Ok ( String :: from ( pattern_long. to_str ( ) . unwrap ( ) ) )
0 commit comments