[Clipart] PASSFAIL Report

Jonadab the Unsightly One jonadab at bright.net
Wed Aug 4 22:40:17 PDT 2004


Alan Horkan <horkana at maths.tcd.ie> writes:

> Is there ever any reason to want uppercase file extensions?

Not for our purposes.  Most systems that tend toward uppercase
filenames (DOS, VMS, ...) are not case-sensitive; whereas, certain
major platforms that _are_ case sensitive (*cough* POSIX) want the
lowercase ones.  So they should be lowercased.  To accomplish that,
anyone with the relevant permissions can do this:

perl -e ' for (<*.SVG>) { my $f=$_; s/SVG$/svg/; `mv -i $f $_`; } '

> (I vaguely recall that sometimes windows did strange things if the
> DOS filename was all in uppercase and would automatically show it
> with a differnt case without actually 'renaming' it to lowercase)

You're talking about the way Win9x autogenerates LFNs.  Yes, it's
weird (and inconsistent).  Doesn't actually *matter*, though; LFNs on
FAT are case-preserving, but Windows is not case-sensitive, and if you
have two files in the same directory with the same 8.3 filename, Bad
Things ensue.  Theoretically, you're not supposed to be able to create
such a situation.  command.com builtins won't let you, for example,
and I don't *think* explorer.exe will do it either.  It is however
possible if you use deprecated portions of the old ISR-based API, or
use software that does that.  And if you do, the results are messy.
All of which is neither here nor there:  our upload script forces
all-lowercase filenames, which should prevent the issue from ever
cropping up as a result of our filenames.  

Hmmm...  actually, now that I think about it, if we intend to support
lesser platforms such as DOS the upload script should ensure that the
first eight characters of the filename are unique, but that means
reading in the whole directory, and it doesn't matter for any modern
platform.  I'll think about this.

> Rather than allowing both could the script instead correct .SVG -> .svg?

The upload script does this already.  (Actually, if the user says the
image is an SVG, the existing extension is ignored; it could be .XML
and would still come out as .svg after the upload.)  These are
probably files that were uploaded with the old upload script; once
they're changed, it shouldn't come up again.

-- 
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,"ten.thgirb\@badanoj$/ --";$\=$ ;-> ();print$/




More information about the clipart mailing list