facebook / facebook/zstd

Zstd should not ignore symbolic links when writing to stdout

Open
#3,627 13 comments 5 reactions 1 assignee Claimed by @Cyan4973 View on GitHub
Dominant language
C
Stars
27.9k
Forks
2.6k
Avg merge
1d 3h
Merged PRs (30d)
8

Description

**Describe the bug**

I think zstd should not ignore symlinks when writing to stdout since it is the same effect as when using `zstdcat`. As reference I'm using the python package xopen to read in zst files which are often symlinks. This package uses `zstd -dc` in its implementation. One could argue where this should be fixed though I think there is not reason zstd should ignore symlinks in this case.

**To Reproduce**
```
echo "Hello World" | zstd -o helloworld.zst
ln -s helloworld.zst helloworld.zst.symlink
zstdcat helloworld.zst.symlink #Works
zstd -dc helloworld.zst.symlink #Ignores symlink
```

```
Hello World
Warning : helloworld.zst.symlink is a symbolic link, ignoring
```

**Expected behavior**

```
Hello World
Hello World
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.