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

Safe operations for Entry values #31

Open
mpolney opened this issue Sep 27, 2016 · 1 comment
Open

Safe operations for Entry values #31

mpolney opened this issue Sep 27, 2016 · 1 comment

Comments

@mpolney
Copy link

mpolney commented Sep 27, 2016

I think it would be useful to be able to modify Entry safely. I need to read all the entries out of an archive and change the pathnames. Currently I'm doing this with eRelativePath, but that seems to be unsafe, since the library internally uses the trailing "/" as a marker for directories.

This is important in my use case, because I am using OptRecursive to add a directory full of files, and then trimming all the paths in the entries. When using OptRecursive with addaddEntryToArchive on a directory, the directory is given an entry in the archive of its own. During my path trimming, the trailing slash happens to be eliminated, which -- as far as the library is concerned -- turns the directory entry into a file entry. Then, when I write out the archive, I end up with a blank file with the same path and filename as the directory.

@jgm jgm closed this as completed in fac76a6 Jun 4, 2017
@jgm
Copy link
Owner

jgm commented Jun 4, 2017

I had to revert this change because of problems it caused.

@jgm jgm reopened this Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants