Skip to content
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

Are symlinks supported? #90

Open
saurabhnanda opened this issue Nov 8, 2022 · 4 comments
Open

Are symlinks supported? #90

saurabhnanda opened this issue Nov 8, 2022 · 4 comments

Comments

@saurabhnanda
Copy link

It seems that symlinks are extracted as plain text files with the file contents being the actual link. Is this expected? Is the link information anywhere in the EntryDescription? (I tried poking around, but wasn't able to figure this out).

@mrkkrp
Copy link
Owner

mrkkrp commented Nov 9, 2022

Hmm, interesting. I did not try to use the library with symlinks. IIRC there is no special handling for them. I imagine it is quite doable to add a check using pathIsSymbolicLink https://hackage.haskell.org/package/directory-1.3.8.0/docs/System-Directory.html#v:pathIsSymbolicLink, and then just follow the link before we start reading the contents.

I cannot promise to find time to implement this feature, but I would be happy to review a PR that implements it.

@saurabhnanda
Copy link
Author

Actually in my case the ZIP file is being created by some other process. The problem was during unzipping. If you can guide me what to do, I can try my hand at a PR.

@mrkkrp
Copy link
Owner

mrkkrp commented Nov 9, 2022

Well, if the tool zips that way, there is nothing zip can do to recover the information. Unless I'm misunderstanding something here?

@saurabhnanda
Copy link
Author

@mrkkrp this is the standard zip tool. And the standard unzip tool works fine on it (i.e. it preserves the symlinks). So, the zip file does have the symlink information. The question is, how to honor that information from the zip library when calling something like saveEntry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants