Skip to content

Commit 88bf74a

Browse files
committed
Skip links in DFXML as well
1 parent e7b72a2 commit 88bf74a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@ def write_csv_row(writer, sip_path, bag_files):
209209
for (event, obj) in Objects.iterparse(dfxml_file):
210210
if not isinstance(obj, Objects.FileObject):
211211
continue
212-
if obj.is_dir():
212+
213+
# skip directories and links
214+
if obj.name_type and obj.name_type != "r":
213215
continue
216+
214217
file_count += 1
215218
mtime = ""
216219
if obj.mtime:

0 commit comments

Comments
 (0)