Skip to content

package: rzip doesn't handle symbolic-linked directories #4383

Description

@weikanglim

As discovered by #4258, in our current implementation of rzip.CreateFromDirectory, the following behaviors are observed:

  1. Symbolic-linked files are followed, and the target contents are copied into the archive.
  2. The function throws an error "read: some_file_path: is a directory` while processing directories containing symbolic directories.

Here's the failing test for that. Comment out line 52-55 to get it into a partial failure to observe the symbolic-linked files being followed.

A tactical thing we could do in the short-term is to add a skip for symbolic-linked directories. This would at least allow the archive processing to continue, while preserving the existing behavior.

The "right" thing to do is probably to recursively follow symbolic-linked directories, with a depth limit to bail out to avoid infinite recursion (aligned with gnuutils: zip behavior).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions