New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"no such file or directory" when reading symlinks #222
Comments
I met the same error when creating tar ball. |
Any updates to this issue ? |
I've just got acquainted with this library, and I noticed that symlinks with target like |
I fixed this issue for myself as it was urgent, also submitted corresponding pull request.
|
What version of the package or command are you using?
github.com/mholt/archiver/v3 v3.3.0
What are you trying to do?
Create a zip from a folder that contains symlinks that is not directly in the current path
What steps did you take?
z.Archive([]string{"/Users/claasmi/.provisioning-cli/package"}, "package.zip")
What did you expect to happen, and what actually happened instead?
Expected: Successfully create the zip file
Actual: Fails with error:
walking /Users/claasmi/.provisioning-cli/package: /Users/claasmi/.provisioning-cli/package/node_modules/.bin/acorn: writing: package/node_modules/.bin/acorn: readlink: readlink package/node_modules/.bin/acorn: no such file or directory
How do you think this should be fixed?
I believe the issue is on this line:
archiver/zip.go
Line 341 in b44e6c6
It tries to read the symlink file by just its base name, without resolving the full path
Please link to any related issues, pull requests, and/or discussion
None
Bonus: What do you use archiver for, and do you find it useful?
I use it for package app deployment packages for an internal CI/CD tool
The text was updated successfully, but these errors were encountered: