Posted by
Kenneth Sloan on
Apr 25, 2014; 3:44pm
URL: http://imagej.273.s1.nabble.com/Install-plugin-command-should-allow-zip-files-tp5007432p5007436.html
I disagree. The tendency to rely on suffixes to provide meta-information about file type is
a most unfortunate one. There are, I'm sure, ways to detect whether or not a given file
is a valid ".jar" file - no matter what the filename is.
"Be conservative in what you produce, but liberal in what you accept" is the watchword
for good protocol design. Using suffixes as a hint is OK. Rejecting perfectly good
input because of an ironclad naming system is not.
In my opinion, no program should make an accept/rejection decision based on the NAME
of a file - only on the content. If the content is not sufficient - then THAT bug should be squashed.
All of the above is even more important when trying to deliver content across many different
platforms and operating systems. Not EVERYONE uses the same file naming conventions
that you have been exposed to.
--
Kenneth Sloan
[hidden email]
On Apr 25, 2014, at 10:18 , Johannes Schindelin <
[hidden email]> wrote:
> Hi Jon,
>
> On Fri, 25 Apr 2014, Jon Harman wrote:
>
>> I have changed the .jar suffix for my plugin to .zip when emailing it
>> since many email providers will not accept .jar files. This works fine
>> and is recognized as a plugin by ImageJ. So the plugin installer should
>> recognize .zip.
>
> While it is true that every .jar file is also a .zip file, the converse is
> not true.
>
> Therefore, what you ask for would introduce a bug. (That ImageJ recognizes
> ..zip files as .jar files is a very notable bug, too.)
>
> The correct way to resolve your issue is for the recipients of said mail
> to rename the file back.
>
> Ciao,
> Johannes
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html