Matches prefix to verify presence of DOCX,PPTX,XLSX files instead of standard file names#3959
Conversation
|
Hi @srisudarsan, thanks for the contribution. The fix looks reasonable. Could you please update the changelog and bump the version (convention is to bump from |
scanny
left a comment
There was a problem hiding this comment.
@badGarnet looks good to me :)
| filenames = zip.namelist() | ||
|
|
||
| if "word/document.xml" in filenames: | ||
| if any(re.match(r"word/document.*\.xml$", filename) for filename in filenames): |
There was a problem hiding this comment.
I think the final word on is_docx will be a package part with the ContentType you highlighted in the .rels file, but I'm fine with this as a step toward that :)
There was a problem hiding this comment.
Aligned too. Will raise another PR with changes incorporating the content type identified from [Content_Types].xml
Done |
|
@badGarnet , seems like the previous run failed, I have updated the CHANGELOG with the recent number, can you approve this flow now ? |
seem you forgot to bump the version in |
Thanks for highlighting, wasn't aware, done now |
Linting is now complaining of missing empty line. I would suggest you install |
I don't think I am getting it right. pre-commit runs and removes the line if added, can you please help making this change and getting this through ? |


Instead of looking for presence of
word/document.xml,ppt/presentation.xmlandxl/workbook.xmlto identify DOCX,PPTX and XLSX files, we look for prefixword/document*.xml,ppt/presentation*.xmlandxl/workbook*.xmlas certain files generated from office365 has files with different names.Fixes #3937