--- a/MIMETypes.st Fri Jun 23 13:43:48 2017 +0200
+++ b/MIMETypes.st Wed Jun 28 13:32:48 2017 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1997 by eXept Software AG
All Rights Reserved
@@ -933,7 +935,7 @@
lcFilename := filename baseName asLowercase.
type := FilenameToTypeMapping at:lcFilename ifAbsent:nil.
type isNil ifTrue:[
- "/ allow for fallback ...
+ "/ allow for fallback (maybe Windows registry knows something)...
type := OperatingSystem mimeTypeForFilename:lcFilename.
"/ the special value #unknown is returned as nil;
"/ this avoids constant retry if a mimeType is not known in
@@ -949,11 +951,11 @@
type isNil ifTrue:[
suff := filename suffix.
- suff size ~~ 0 ifTrue:[
+ suff notEmpty ifTrue:[
"/ sigh - special code for multiple-suffices...
"/ .tar.gz -> tgz
suff2 := filename withoutSuffix suffix.
- suff2 size > 0 ifTrue:[
+ suff2 notEmpty ifTrue:[
type := self mimeTypeForSuffix:(suff2 , '.' , suff).
].
type isNil ifTrue:[
@@ -980,7 +982,7 @@
"Modified: / 10-05-2011 / 11:55:18 / cg"
"Modified (format): / 28-07-2012 / 09:39:15 / cg"
- "Modified: / 09-02-2017 / 23:45:45 / stefan"
+ "Modified (format): / 27-06-2017 / 16:25:40 / stefan"
!
mimeTypeForFilename:filename put:mimeType