1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tk/sample/tkextlib/treectrl/explorer.rb: File.executable? returns true

even if it's plain text file. (this function only checks access right)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-04-09 05:28:19 +00:00
parent 458547da6a
commit 58f1ea99d7
2 changed files with 7 additions and 10 deletions

View file

@ -1,3 +1,8 @@
2005-04-09 ocean <ocean@ruby-lang.org>
* sample/tkextlib/treectrl/explorer.rb: File.executable? returns true
even if it's plain text file. (this function only checks access right)
2005-04-09 ocean <ocean@ruby-lang.org> 2005-04-09 ocean <ocean@ruby-lang.org>
* sample/tkextlib/treectrl/{help,www-options}.rb: fixed typo. * sample/tkextlib/treectrl/{help,www-options}.rb: fixed typo.

View file

@ -306,13 +306,9 @@ def demoExplorerLargeIcons(t)
img = 'big-exe' img = 'big-exe'
when '.txt' when '.txt'
img = 'big-txt' img = 'big-txt'
else
if FileTest.executable?(file)
img = 'big-exe'
else else
img = 'big-file' img = 'big-file'
end end
end
type = ext.upcase type = ext.upcase
type = type[1..-1] << ' ' unless type.empty? type = type[1..-1] << ' ' unless type.empty?
@ -413,13 +409,9 @@ def demoExplorerList(t)
img = 'small-exe' img = 'small-exe'
when '.txt' when '.txt'
img = 'small-txt' img = 'small-txt'
else
if FileTest.executable?(file)
img = 'small-exe'
else else
img = 'small-file' img = 'small-file'
end end
end
type = ext.upcase type = ext.upcase
type = type[1..-1] << ' ' unless type.empty? type = type[1..-1] << ' ' unless type.empty?