Fixed tiny bug where starting Diakonos with a nonexistent filename caused the /usr/bin/file code to get confused.

This commit is contained in:
pistos 2004-08-25 19:48:52 +00:00
parent fafb23598e
commit 6b63beb6f2
2 changed files with 2 additions and 2 deletions

View file

@ -3296,7 +3296,7 @@ class Diakonos
# Is file readable?
# Does the "file" utility exist?
if FileTest.exist? "/usr/bin/file" and filename != nil
if FileTest.exist?( "/usr/bin/file" ) and filename != nil and FileTest.exist?( filename )
file_type = `/usr/bin/file -L #{filename}`
if file_type !~ /text/
choice = getChoice(

View file

@ -347,7 +347,7 @@ lang.html_tag.tokens.symbols.format white
# Ruby
lang.ruby.filemask \.rb$
lang.ruby.filemask \.(?:rb|gem(?:spec)?)$
lang.ruby.bangmask ruby
lang.ruby.format.default white bold
lang.ruby.format.selection inverse