Diff

Differences From Artifact [64211e4a81]:

To Artifact [bd758d28dd]:


    40     40   	set retval [expr {$retval % $mod}]
    41     41   
    42     42   	return $retval
    43     43   
    44     44   }
    45     45   
    46     46   # Read contents of mime types file
    47         -set fd [open $mimeinfofile]
    48         -set mimeinfo [read $fd]
    49         -close $fd
           47  +catch {
           48  +	set fd [open $mimeinfofile]
           49  +	set mimeinfo [read $fd]
           50  +	close $fd
           51  +}
           52  +
           53  +if {![info exists mimeinfo]} {
           54  +	puts stderr "Not using $mimeinfofile, unreadable."
           55  +
           56  +	exit 1
           57  +}
           58  +
           59  +puts stderr "Using $mimeinfofile as mime.types"
    50     60   
    51     61   # Parse into type and extensions pairs
    52     62   foreach line [split $mimeinfo "\n"] {
    53     63   	regsub {#.*} $line {} line
    54     64   	set line [string trim $line]
    55     65   
    56     66   	if {$line == ""} {