Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tarfile recognizes .gz file as tar #76616

Closed
spetrunin mannequin opened this issue Dec 27, 2017 · 2 comments
Closed

tarfile recognizes .gz file as tar #76616

spetrunin mannequin opened this issue Dec 27, 2017 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@spetrunin
Copy link
Mannequin

spetrunin mannequin commented Dec 27, 2017

BPO 32435
Nosy @serhiy-storchaka
Files
  • big_0_file_1.gz: 10 GB of '0' compressed with GZip
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2017-12-27.21:56:20.522>
    labels = ['library']
    title = 'tarfile recognizes .gz file as tar'
    updated_at = <Date 2017-12-27.22:24:14.191>
    user = 'https://bugs.python.org/spetrunin'

    bugs.python.org fields:

    activity = <Date 2017-12-27.22:24:14.191>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2017-12-27.21:56:20.522>
    creator = 'spetrunin'
    dependencies = []
    files = ['47353']
    hgrepos = []
    issue_num = 32435
    keywords = []
    message_count = 2.0
    messages = ['309106', '309108']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'spetrunin']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32435'
    versions = ['Python 2.7', 'Python 3.6']

    @spetrunin
    Copy link
    Mannequin Author

    spetrunin mannequin commented Dec 27, 2017

    Library's function 'tarfile.is_tarfile' returns 'True' on GZip file (9.7 megabytes see attachment), that is a file with 10 gigabytes of '0' character compressed with 'gzip' utility (no 'tar' whatsoever).

    Desired result: this function should return False in this case, b.c. this file is not a tar file.

    @spetrunin spetrunin mannequin added the stdlib Python modules in the Lib dir label Dec 27, 2017
    @serhiy-storchaka
    Copy link
    Member

    This file is a correct empty tar file. The tar utility accepts it too.

    $ tar tf big_0_file_1.gz; echo $?
    0

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @encukou encukou closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    Status: Done
    Development

    No branches or pull requests

    2 participants