Fixed tiny bug where starting Diakonos with a nonexistent filename caused the /usr/bin/file code to get confused.
This commit is contained in:
parent
fafb23598e
commit
6b63beb6f2
2
diakonos
2
diakonos
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue