File tree 1 file changed +15
-4
lines changed
1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 2
2
import collections
3
3
import concurrent .futures
4
4
from datetime import timedelta
5
+ from glob import glob
5
6
import json
6
7
import os
7
8
from packaging import version
@@ -440,12 +441,22 @@ def find_inos():
440
441
if args .sketches :
441
442
arg_sketch_pattern = re .compile (args .sketches , re .IGNORECASE )
442
443
for spath in search_path_list :
443
- for spath_object in spath .glob ("**/*.[ip][nd][oe]" ):
444
+ # Due to issue with Path.glob() which does not follow symlink
445
+ # use glob.glob
446
+ # See: https://bugs.python.org/issue33428
447
+ # for spath_object in spath.glob("**/*.[ip][nd][oe]"):
448
+ # if args.sketches:
449
+ # if arg_sketch_pattern.search(str(spath_object)) is None:
450
+ # continue
451
+ # if spath_object.is_file():
452
+ # sketch_list.append(spath_object.parent)
453
+ for sk_ino in glob (str (spath / "**" / "*.[ip][nd][oe]" ), recursive = True ):
444
454
if args .sketches :
445
- if arg_sketch_pattern .search (str ( spath_object ) ) is None :
455
+ if arg_sketch_pattern .search (sk_ino ) is None :
446
456
continue
447
- if spath_object .is_file ():
448
- sketch_list .append (spath_object .parent )
457
+ p_ino = Path (sk_ino )
458
+ if p_ino .is_file ():
459
+ sketch_list .append (p_ino .parent )
449
460
sketch_list = sorted (set (sketch_list ))
450
461
451
462
You can’t perform that action at this time.
0 commit comments