<div style="font-family: Arial; font-size: 14px;">Hi all,</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">We have a use case where we need to load multiple magic files for detecting types, but we observed that MAGIC_CONTINUE flag doesn't look at rules beyond first matching magic file when there are more than one magic files loaded.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">For illustration, when there are 2 magic files loaded as "<span style="background-color:rgb(255, 255, 255);display:inline !important">magic1:magic2", using</span> MAGIC_CONTINUE flag it output multiple hits on on magic1, but it didn't look rules on magic2.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;"><span>We use the usual way of magic_open(MAGIC_CONTINUE) followed by magic_load and magic_file to get the final output.</span><br></div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">It seems that the only way to get expected behavior with <span style="background-color:rgb(255, 255, 255);display:inline !important">MAGIC_CONTINUE</span> is not using multiple magic files in the first place, stick to using only one magic file by concatenating two magic files into one file before loading it, but <span style="background-color:rgb(255, 255, 255);display:inline !important">concatenating</span> before loading is rather inconvenient and less elegant when multiple file loading feature is actually available. </div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">Tested this on 5.39. Found similar issue on <a target="_blank" rel="noreferrer nofollow noopener" href="https://bugs.astron.com/view.php?id=373">https://bugs.astron.com/view.php?id=373</a> </div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">Thanks.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;"><br></div>
<div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
<div class="protonmail_signature_block-user protonmail_signature_block-empty">
</div>
<div class="protonmail_signature_block-proton">
Sent with <a target="_blank" href="https://proton.me/" rel="noopener noreferrer">Proton Mail</a> secure email.
</div>
</div>