-
Notifications
You must be signed in to change notification settings - Fork 27
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
sub-directories as file names #89
Comments
Was this working before 0.12.4 release? |
Ok, so I did few tests:
So this is indeed a issue with this create. Now, we need to find why. |
Found another one: I tested with 7z, lha (lhasa),the delharc crate and various gui apps using libarchive. Everything is fine. It is strange that only some files fail in this particular way and not all. A mystery. :-) |
Not a mistery, it has different path separator. See:
|
I am trying to understand why it isn't splitting the |
I got the debug output using following patch: diff --git a/src/lib.rs b/src/lib.rs
index 0db45a9..5649de8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -256,6 +256,8 @@ where
)
.unwrap();
+ dbg!(&target_path);
+
ffi::archive_entry_set_pathname(entry, target_path.as_ptr());
let link_name = ffi::archive_entry_hardlink(entry); |
It seems the core issue is the Path handling in Rust. See following example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a2dc0880eb9be5b30156b9d206cd0d1b |
Hm, then the problem is somewhere else (earlier?) because every path in the archive is separated by a single backslash.
Still a mystery. :-) |
Unsure. Here it shows a different path for 035.SDM. I suspect you are using Windows? |
Where ever this comes from, it's not correct.
No, I use Arch Linux. |
On list, it shows fine. On extract it fails. |
This seems to be fixed (by accident) with e9637bf. Until a buffer size of Probably a libarchive internal bug? (Although running against libarchive build with ASAN and UBSAN reports no issues.) |
Please add a CHANGES item mentioning this. We could then cut a release :-) |
There seems to be an issue with side effects of Line 569 in c08486c
Line 276 in c08486c
produces the correct path (but obviously only NUL data). |
compress-tools v0.13.0, libarchive v3.6.1
Example archive:
http://ftp.uni-erlangen.de/mirrors/aminet/demo/aga/Hardcore.lha
Test:
Current result:
File "035.SDM" in root directory named "sdm-hardcore\datas\035.SDM"
Expected result:
File "035.SDM" in directory "sdm-hardcore/datas"
The text was updated successfully, but these errors were encountered: