Better detection of compressed file types

Sometimes regular old zip files with a .rar extension give the error that "The archive appears to be invalid or damaged"

  1. Make a text file text.txt with just the word Text in it
  2. Use Directory Opus to make an archive text.zip
  3. Rename the text.txt to text.rar
  4. Use Opus to extract the file
  5. Error "The archive appears to be invalid or damaged"

I know this is not Opus' fault. That is why this is a feature request and not a bug.

But it is more common than you might think online to find rar files that are really zip files (about 20% on my system - still hundreds). Perhaps you could dig a little deeper if rar gives you an error.

Thank you for your consideration,
Trev

1 Like

Doing that would massively complicate how archives and plugins work, so we probably won’t ever do that. Fix the archives extensions instead.

If you use 7-zip's context menu integration (or create your own that utilizes 7-zip) it doesn't encounter an error in the specified scenario.

I agree with Leo regarding the extension-fixing, but I must admit I find it kind of annoying that so many files have the wrong extension and I don't really always want to change filenames when working in 'harddrive archives' that I don't want to change.

Where are these wrong-extension archives coming from? I would complain to the people putting them on the internet.

I've seen it a lot with images (presumably because something converts them behind the scenes on the server and doesn't give them a new name, to avoid breaking links or something) but it's not something I've run into with archives, as far as I can remember, and it'd usually mean people couldn't open the archives at all in most software.

lol, yes, complaining to someone, somewhere, sometime, on the internet. Sure, Leo :wink: I don't think those people know what they're doing and I honestly don't blame them.

It see it a lot with CBR really being CBZ archives (that is: comic book ZIP archives being called RAR archives) and then I reluctantly fix the filename because I think it's the Right Thing to do since I don't like wrong filenames.

1 Like

ARRGGH! @BuckyB you're right! About 2% of CBR are CBZ (still nearly 100). I did not make that connection until now! I guess I have a lot more renaming in my list of things to do today!

I hope you let tools do most of the work. ExifTool and TrID are great for this, as discussed here and here.

1 Like

Definitely checking those two out. Thanks lxp!