We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 137c101 commit 976397cCopy full SHA for 976397c
zstash/extract.py
@@ -770,7 +770,11 @@ def _extractFiles_impl( # noqa: C901
770
logger.debug("Valid md5: {} {}".format(md5, fname))
771
772
elif extract_this_file:
773
- tar.extract(tarinfo)
+ # Python 3.11 and earlier don't support the filter parameter at all
774
+ if sys.version_info >= (3, 12):
775
+ tar.extract(tarinfo, filter="tar")
776
+ else:
777
+ tar.extract(tarinfo)
778
# Note: tar.extract() will not restore time stamps of symbolic
779
# links. Could not find a Python-way to restore it either, so
780
# relying here on 'touch'. This is not the prettiest solution.
0 commit comments