winmerge icon indicating copy to clipboard operation
winmerge copied to clipboard

Tar files are not recognized if not ending with the `.tar` extension

Open stdedos opened this issue 3 years ago • 12 comments

stdedos avatar Mar 08 '22 21:03 stdedos

Unlike zip files, tar files do not have a fixed signature. For this reason, unfortunately, even with the "Detect archive type from file signature" option enabled, WinMerge cannot consider a file with a non-tar extension to be a tar file.

sdottaka avatar Mar 08 '22 23:03 sdottaka

What would happen if WinMerge simply assumed any file with a .tar extension is an archive? Any errors need to be trapped whether or not the file is actually an archive.

Gitoffthelawn avatar Mar 09 '22 03:03 Gitoffthelawn

Unlike zip files, tar files do not have a fixed signature.

Oh yeah, you are right Especially for the files I repro'ed it with, they literally start with the file paths first - no magic signature 😕

stdedos avatar Mar 09 '22 10:03 stdedos

What would happen if WinMerge simply assumed any file with a .tar extension is an archive? Any errors need to be trapped whether or not the file is actually an archive.

WinMerge always considers files with the extension tar to be archive files when Archive support is enabled. If the file is not actually in tar format, you will get the following error: (This error message is confusing ...)

image

sdottaka avatar Mar 09 '22 11:03 sdottaka

(This error message is confusing ...)

This error message is suuuuper confusing 😅

stdedos avatar Mar 09 '22 11:03 stdedos