mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
zip-archive and rar-archive have different folder separators #433
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daniilzaonegin on GitHub (Jan 15, 2021).
Hi!
Is it alright, that library returns different folder separators for rar and zip?
For example
This program returns
We have a solution, that opens archive and shows tree-structure to the user with folders and files.
And I had to handle this case, because we split entry.Key either by "\" or by "/" for building tree structure.
I think library should return unified folder separators independent of archive type.
@adamhathcock commented on GitHub (Jan 15, 2021):
Entry.Key is a string that comes directly from the archive. It's not interpreted as a file path. The
Writeextension methods do this. This library is not intended to be a high level API to do what you're asking.@daniilzaonegin commented on GitHub (Jan 15, 2021):
Okay, thank you! Then I will rewrite my code. First better extract all files from archive to some temporary folder and then build a tree-structure for the user based on this folder.