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.py: fix for 1330039 #42501

Closed
gustaebel mannequin opened this issue Oct 19, 2005 · 2 comments
Closed

tarfile.py: fix for 1330039 #42501

gustaebel mannequin opened this issue Oct 19, 2005 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@gustaebel
Copy link
Mannequin

gustaebel mannequin commented Oct 19, 2005

BPO 1331635
Nosy @gustaebel
Files
  • 1330039.diff: patch to Lib/tarfile.py and Lib/test/test_tarfile.py
  • 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 = <Date 2005-10-20.04:56:41.000>
    created_at = <Date 2005-10-19.12:39:03.000>
    labels = ['library']
    title = 'tarfile.py: fix for 1330039'
    updated_at = <Date 2005-10-20.04:56:41.000>
    user = 'https://github.com/gustaebel'

    bugs.python.org fields:

    activity = <Date 2005-10-20.04:56:41.000>
    actor = 'nnorwitz'
    assignee = 'nnorwitz'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2005-10-19.12:39:03.000>
    creator = 'lars.gustaebel'
    dependencies = []
    files = ['6828']
    hgrepos = []
    issue_num = 1331635
    keywords = ['patch']
    message_count = 2.0
    messages = ['48878', '48879']
    nosy_count = 2.0
    nosy_names = ['nnorwitz', 'lars.gustaebel']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1331635'
    versions = ['Python 2.4']

    @gustaebel
    Copy link
    Mannequin Author

    gustaebel mannequin commented Oct 19, 2005

    The attached patch fixes bug bpo-1330039. The patch
    includes a testcase.

    A file is added to an archive as a hardlink if a file
    with the same inode number (and device number) was
    added before without futher checks. This leads to the
    undesired behaviour described in bpo-1330039, i.e. if two
    throwaway temporary files are assigned the same inode
    number by the filesystem, the second one will be added
    as a hardlink to the first, which means that the
    content will be lost.

    The patched code checks if the file's st_nlink is
    greater 1. So only for files that actually have several
    links pointing to them hardlinks will be created, which
    is what GNU tar does.

    @gustaebel gustaebel mannequin closed this as completed Oct 19, 2005
    @gustaebel gustaebel mannequin assigned nnorwitz Oct 19, 2005
    @gustaebel gustaebel mannequin added the stdlib Python modules in the Lib dir label Oct 19, 2005
    @gustaebel gustaebel mannequin closed this as completed Oct 19, 2005
    @gustaebel gustaebel mannequin assigned nnorwitz Oct 19, 2005
    @gustaebel gustaebel mannequin added the stdlib Python modules in the Lib dir label Oct 19, 2005
    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Oct 20, 2005

    Logged In: YES
    user_id=33168

    Thanks Lars.

    Checked in as:

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    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
    None yet
    Development

    No branches or pull requests

    0 participants