File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -787,14 +787,17 @@ def _make_tagmanifest_file(alg, bag_dir):
787
787
tagmanifest .write ('%s %s\n ' % (digest , filename ))
788
788
789
789
def _find_tag_files (bag_dir ):
790
- for dir_name , _ , filenames in os .walk (bag_dir ):
791
- if not re .match (r'.*data$' , dir_name ):
792
- for filename in filenames :
793
- if filename .startswith ('tagmanifest-' ):
794
- continue
795
- #remove everything up to the bag_dir directory
796
- p = join (dir_name , filename )
797
- yield os .path .relpath (p , bag_dir )
790
+ for dir in os .listdir (bag_dir ):
791
+ if dir != 'data' :
792
+ if os .path .isfile (dir ) and not dir .startswith ('tagmanifest-' ):
793
+ yield dir
794
+ for dir_name , _ , filenames in os .walk (dir ):
795
+ for filename in filenames :
796
+ if filename .startswith ('tagmanifest-' ):
797
+ continue
798
+ #remove everything up to the bag_dir directory
799
+ p = join (dir_name , filename )
800
+ yield os .path .relpath (p , bag_dir )
798
801
799
802
def _walk (data_dir ):
800
803
for dirpath , dirnames , filenames in os .walk (data_dir ):
You can’t perform that action at this time.
0 commit comments