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
Bugfix issue#222 #296
Bugfix issue#222 #296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. It's a likely approve, I'm mostly wondering if the GitHub actions should replace our broken Azure CI. And maybe the CI changes should be on a different PR?
d0940d7
to
7824911
Compare
Thanks for the reply. I reverted all changes related to CI. |
Noticed that this pull request solves same issue as https://github.com/mholt/archiver/pull/201/files and https://github.com/mholt/archiver/pull/230/files, the difference is that this one does it for both .zip and .tar archives while the other only for .tar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will try to get this merged. Just one nit before doing so.
archiver.go
Outdated
@@ -125,6 +125,9 @@ type File struct { | |||
type FileInfo struct { | |||
os.FileInfo | |||
CustomName string | |||
// Stores path to the source. | |||
// Used when reading a symlink. | |||
SrcPath string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SrcPath string | |
SourcePath string |
Generally I prefer to spell out words if it's not cumbersome, and I think we can in this case, since "source" is a pretty short word.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
7824911
to
78cca10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Did you still want to use your CI files? We could look at those in another PR.
Bug description:
When writing symlinks to .zip or .tar archive, Write method uses the archive path instead of real path to access a symlink on the file system. This causes errors like
readlink: readlink path/to/some/file: no such file or directory
.Bug fix:
SrcPath
field toarchiver.FileInfo
so that Write method can use it to read the symlink.