1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
Are you 100% sure that the tarf.getnames() returns "real" files ? It can also return symlinks, directories, etcetc.
Look at https://docs.python.org/3/library/tarfile.html#tarfile.TarInfo
TarInfo.type
File type. type is usually one of these constants: REGTYPE, AREGTYPE, LNKTYPE,
SYMTYPE, DIRTYPE, FIFOTYPE, CONTTYPE, CHRTYPE, BLKTYPE, GNUTYPE_SPARSE.
To determine the type of a TarInfo object more conveniently, use the is*() methods below.
So, you may want to check the type of the tar member before uploading it.
Best,
Didier
Relevant content
- asked a year ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 7 months ago