-
Notifications
You must be signed in to change notification settings - Fork 54
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
trailing slashes for "leaf" directories, usage of '\\' #31
Comments
The option to use a different path separator already exists. Did you take a look at the documentation linked in the README file? Edit: about |
Actually in rarfile 3.0 the default path_sep is '/' now. But rarfile does not have any special handling for dirs, you are supposed to check mode. Seems ZIP format stores final '/' in archive, while RAR does not. Should rarfile append '/' to dirs? |
@XenHat is_dir() isn't much use for traversing the archive, like in a file manager. One can get the dir info either way, but it's an extra check on every "leaf" folder, might add up on vast archives so it's a bit of a shame. Also not compatible with the Zipfile style. @markokr |
Since the RARFile information says it tries to behave as closely to zipfile as possible, I would say yes. Footnote: I wonder if the lack of trailing slash would cause my odd problem with some archives (#29 )since it tends to happen with archives with multiple subfolder levels (the most common example I have is libboost, which is huge, tree-wise)? |
Hi,
I Wanted to ask regarding some parsing issues I'm having.
On Windows, Zipfile listings look like this:
'Folder/Folder2/FILE'
'Folder/Folder2/EmptyFolder/'
With Rarfile it's:
u'Folder\\Folder2\\FILE'
u'Folder\\Folder2\\EmptyFolder'
This causes obstacles -
Would it be possible to add trailing slashes to last-in-line folders, and/or use Python's generic platform agnostic '/' instead of '\\'? That would be awesome, as it would allow to utilize a single generic archive parsing.
Thanks.
The text was updated successfully, but these errors were encountered: