@@ -320,7 +320,7 @@ pub fn init(
320
320
321
321
// Check if includes exist
322
322
for path in vendor_package. include_from_upstream . clone ( ) {
323
- if !PathBuf :: from ( extend_paths ( & [ path. clone ( ) ] , dep_path) ?[ 0 ] . clone ( ) ) . exists ( ) {
323
+ if !PathBuf :: from ( extend_paths ( & [ path. clone ( ) ] , dep_path, true ) ?[ 0 ] . clone ( ) ) . exists ( ) {
324
324
warnln ! ( "{} not found in upstream, continuing." , path) ;
325
325
}
326
326
}
@@ -330,7 +330,7 @@ pub fn init(
330
330
true => copy_recursively (
331
331
& link_from,
332
332
& link_to,
333
- & extend_paths ( & vendor_package. include_from_upstream , dep_path) ?,
333
+ & extend_paths ( & vendor_package. include_from_upstream , dep_path, false ) ?,
334
334
& vendor_package
335
335
. exclude_from_upstream
336
336
. clone ( )
@@ -470,6 +470,7 @@ pub fn diff(
470
470
& extend_paths (
471
471
& vendor_package. include_from_upstream ,
472
472
& vendor_package. target_dir ,
473
+ false ,
473
474
) ?,
474
475
& vendor_package
475
476
. exclude_from_upstream
@@ -788,12 +789,13 @@ pub fn copy_recursively(
788
789
pub fn extend_paths (
789
790
include_from_upstream : & [ String ] ,
790
791
prefix : impl AsRef < Path > ,
792
+ dir_only : bool ,
791
793
) -> Result < Vec < String > > {
792
794
include_from_upstream
793
795
. iter ( )
794
796
. map ( |pattern| {
795
797
let pattern_long = PathBuf :: from ( pattern) . prefix_paths ( prefix. as_ref ( ) ) ?;
796
- if pattern_long. is_dir ( ) {
798
+ if pattern_long. is_dir ( ) && !dir_only {
797
799
Ok ( String :: from ( pattern_long. join ( "**" ) . to_str ( ) . unwrap ( ) ) )
798
800
} else {
799
801
Ok ( String :: from ( pattern_long. to_str ( ) . unwrap ( ) ) )
0 commit comments