-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(archive): support multipart archives #8184
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
Conversation
WalkthroughThis PR introduces support for multipart archives in RAR and 7zip formats, including handling encrypted archives. It rewrites the RAR tool using Changes
|
}, nil | ||
} | ||
|
||
func (RarDecoder) List(ss []*stream.SeekableStream, args model.ArchiveInnerArgs) ([]model.Obj, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The List
function for RarDecoder
currently returns errs.NotSupport
. If listing files within the archive is a required feature, this needs to be implemented to avoid functionality gaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是正常的,List
返回errs.NotSupport
时,op
包会调用GetMeta
得到文件列表。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在这机器人这么智能了吗 😹
}, nil | ||
} | ||
|
||
func (SevenZip) List(ss []*stream.SeekableStream, args model.ArchiveInnerArgs) ([]model.Obj, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The List
function for SevenZip
currently returns errs.NotSupport
. If listing files within the archive is a required feature, this needs to be implemented to avoid functionality gaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
Oh, cool! Thanks for sparing some time to add these options. |
I don't know if there's something wrong on my end, but I can't view or decompress files with the builds from this PR: https://github.com/AlistGo/alist/actions/runs/14073797065 Is there a new option that I haven't seen that I should enable from now on? @KirCute |
There is one frustrating quirk of the build system: when a PR contains both frontend and backend changes, it still builds the frontend using the latest main branch version (instead of the unmerged PR changes). This caused an issue in my update: I modified the frontend's logic for detecting archived files (to support multipart ones), but since the build used the old frontend code (instead of AlistGo/alist-web#263), it now treats every file as non-archived based on the backend’s new response. As a result, the Archive Preview won’t show up at all. |
Oh, I see. I kind of figured out that could be the problem, but I was not that sure if it was only that at all. Thanks for the quick response, as usual! Oh, and .z00, .z01, etc. are another suffix that zip part files have; some old compressors use this instead of .zip.001, .zip.002, etc. |
During testing, I found that multipart archive files with suffixes like .z00 don't seem to form a complete recognizable archive by simply concatenating them sequentially—similar to .part1.rar files. Unfortunately, I haven’t found a library that supports the .z00 format like RAR does. I could try simply treating them as .zip.001 files, but they likely won’t work as expected. It’s 00:45 GMT+8 now, and I’ll add .z00 to the list of valid multipart suffixes after getting a sleep. |
I see that you already checked it out, but yah not really a necessity. Most of the time for what I have tested remaining them could do the work. Have a good rest! |
Support multipart archives in Zip (with suffix like
.zip.001
), RAR (with suffix like.part1.rar
) and 7zip (with suffix like.7z.001
) formats.Rewrite RAR tool in
nwaples/rardecode
to support encrypted archives.Rewrite 7zip tool in
bodgit/sevenzip
to support encrypted archives.Support decompressing multiple selected files.
Front-end part: AlistGo/alist-web#263.
Close #8015