Skip to content

Tar truncates the first character of filename when using CreateEntryFromFile #334

Closed
@iUnknwn

Description

@iUnknwn

Steps to reproduce

  1. Create an output Tar Archive
  2. Set the root path to an empty string (this happens when our code receives a relative path, so rootPath = GetDirectoryName(targetFile)).
  3. Call CreateFileFromEntry using the filename targetFile - the tarEntry has the correct name property.
  4. Call WriteEntry.
  5. Check the generated output - the filename in the generated archive is missing the leading character.

Expected behavior

The filename in the archive should be the same as what is written.

Actual behavior

The filename in the archive is missing the leading character.

Version of SharpZipLib

1.1.0

Obtained from (only keep the relevant lines)

  • Package installed using NuGet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions