Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An empty archive can be written but not read back #24

@guban

Description

@guban

Steps:

  1. Write zero files to an archive. The archive file is created successfully.
  2. Use mtar_open() to read the archive file.

Expected result: mtar_open() succeeds.
Actual result: mtar_open() fails with the "null record" error.

After writing N files into an archive (where N can possibly be zero), one would expect to read that archive and extract N files from it without a failure. Presently, when reading an archive, one has to check whether the tar file is empty (i.e., the file is 1KB of zeros, which is the end-of-archive entry). It would be nice if mtar_open() could handle this special case without failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions