Conversation
| bool (*check)(RIO *io, const char *, bool many); | ||
| // Optional: enumerate sub-entries of a container URI without opening them all. | ||
| // Returns RList<RIOSubEntry*>, or NULL if the URI has none / plugin doesn't implement it. | ||
| RList* (*list_subs)(RIO *io, const char *uri); |
There was a problem hiding this comment.
I don't think this should exist, just like the zip plugin shouldn't exist. This feels like it should be part of r_fs and that r_fs should operate on the underlying RIODesc and expose subfiles as new RIODesc with a RIOPlugin that lives inside of r_fs. However this probably requires a huge refactoring and I get why this cannot be done easily.
|
PR #25860 — Initial support for cfg.choice for sub-files The design is sound — two-tier sub-binary discovery (IO-level list_subs + bin-level xtr extractors) is a clean layering. The new oS command and the cfg.choice interactive prompt are useful user-facing features. ABI bump is correctly done. But there are a few issues to address: 🔴 High: Dangling io->desc after probe open Fix: Save/restore io->desc around the probe, or NULL it out after close if it was the probe desc. 🔴 High: oS text output duplicates print_subs_table() with different format 🟠 Medium: xtr_extractall int truncation 🟠 Medium: Fake RBinFile swap is fragile 🟡 Low: apply_envs naming is misleading Design observations (non-blocking) For zip-inside-fatmach0 scenarios, the two discovery layers don't compose (IO-level sees zip entries, xtr sees mach-o slices, but you can't xtr-probe an individual zip entry). This is fine for the intended use cases. |
Description