File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,15 @@ def _check_folder_gitignore(self, folder: str) -> Optional[Path]:
548
548
549
549
git_folder = Path (topfolder_result .rstrip ()).resolve ()
550
550
551
- files = [str (p ) for p in Path (git_folder ).rglob ("*" )]
551
+ files : List [str ] = []
552
+ # don't check symlinks; either part of the repo and would be checked
553
+ # twice, or is external to the repo and git won't konw anything about it
554
+ for root , _dirs , git_files in os .walk (git_folder , followlinks = False ):
555
+ for git_file in git_files :
556
+ git_path = os .path .join (root , git_file )
557
+ # followlinks only disables walking into linked dirs
558
+ if not os .path .islink (git_path ):
559
+ files .append (git_path )
552
560
git_options = ["-C" , str (git_folder ), "-c" , "core.quotePath=" ]
553
561
try :
554
562
ignored = subprocess .check_output ( # nosec # skipcq: PYL-W1510
You can’t perform that action at this time.
0 commit comments