@@ -372,7 +372,7 @@ def add_directory(
372
372
373
373
root_path = join (relpath (root , base_path ))
374
374
if self ._ignoreset .is_ignored (join (root_path ,"" )):
375
- self .ignore_dir (root_path )
375
+ self .ignore_dir (join ( into_path , root_path ) )
376
376
dirs [:] = []
377
377
continue
378
378
@@ -385,11 +385,17 @@ def add_directory(
385
385
if (any (self ._not_current_label (d , t ) for t
386
386
in self ._labels .keys ())):
387
387
self ._label_paths .append ((dir_path , base_path , into_path ))
388
- self .ignore_dir (relpath (dir_path , base_path ))
388
+ self .ignore_dir (join (
389
+ into_path ,
390
+ relpath (dir_path , base_path )
391
+ ))
389
392
dirs .remove (d )
390
393
elif (d .startswith ('.' ) or d in self ._legacy_ignore_dirs or
391
394
self ._ignoreset .is_ignored (join (root_path , d , "" ))):
392
- self .ignore_dir (relpath (dir_path , base_path ))
395
+ self .ignore_dir (join (
396
+ into_path ,
397
+ relpath (dir_path , base_path )
398
+ ))
393
399
dirs .remove (d )
394
400
395
401
# Add root to include paths
@@ -443,12 +449,12 @@ def _add_file(self, file_path, base_path, into_path):
443
449
scanning starting as base_path
444
450
"""
445
451
452
+ fake_path = join (into_path , relpath (file_path , base_path ))
446
453
if (self ._ignoreset .is_ignored (relpath (file_path , base_path )) or
447
454
basename (file_path ).startswith ("." )):
448
- self .ignore_dir (relpath ( file_path , base_path ) )
455
+ self .ignore_dir (fake_path )
449
456
return
450
457
451
- fake_path = join (into_path , relpath (file_path , base_path ))
452
458
_ , ext = splitext (file_path )
453
459
454
460
file_type = self ._EXT .get (ext .lower ())
0 commit comments