Skip to content

Hidden files and folders are not mirrored correctly when source is a relative path #3703

@mzoellner

Description

@mzoellner

Describe the bug
When the source of a zstd command is given as a relative path, hidden files and folders are not correctly copied to the target folder, but into the parent of the target folder.

To Reproduce
I created a small repository that makes it easier to reproduce the issue: https://github.com/mzoellner/zstd-repro

Imagine a folder structure like this:

/opt/source/file
/opt/source/.hidden-file
/opt/source/.hidden-folder/file-in-hidden-folder

Then run the following command
mkdir -p /opt/target && cd /opt/source && zstd -r --output-dir-mirror /opt/target ./

.hidden-file.zst and file-in-hidden-folder.zst will both end up in /opt instead of /opt/target

Expected behavior
Hidden files and folders from source are mirrored in target

Desktop (please complete the following information):

  • OS: Debian 12 / Ubuntu 22.04
  • Version zstd 1.5.5

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions