From: Shri Borde Date: 2009-04-03T07:58:20+09:00 Subject: [ruby-core:23110] File.executable? always returns false on Windows machine --_000_710DF26F214D2B4BB94287123FFE980A2E1608E94DNAEXMSGC104re_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On my machine, File.executable? is always returning false. I have tried 1.8= p27. I am running on a Windows Vista x86 machine. The file system is NTFS. = I can't think of anything unusual about my machine. What are the semantic supposed to be? Most of the people I have asked get a= value of true for all of the statements below, even for the File.executabl= e? on the ttf file. puts File.exists?("C:/windows/fonts/wingding.ttf") puts File.readable?("C:/windows/fonts/wingding.ttf") puts File.executable?("C:/windows/fonts/wingding.ttf") # Prints false only = for me puts File.exists?("C:/windows/notepad.exe") puts File.readable?("C:/windows/notepad.exe") puts File.executable?("C:/windows/notepad.exe") # Prints false only for me With the 1.9 binaries, File.executable? returns true only if the file exten= sions is something like .exe. Again, it always returns true for the people = I have asked. Thanks, Shri --_000_710DF26F214D2B4BB94287123FFE980A2E1608E94DNAEXMSGC104re_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

On my machine, File.executable? is always returning fa= lse. I have tried 1.8p27. I am running on a Windows Vista x86 machine. The file sy= stem is NTFS. I can’t think of anything unusual about my machine.

 

What are the semantic supposed to be? Most of the peop= le I have asked get a value of true for all of the statements below, even for the Fil= e.executable? on the ttf file.

 

puts File.exists?("C:/= windows/fonts/wingding.ttf")

puts File.readable?("C:/windows/fonts/wingding.ttf")

puts File.executable?("C:/windows/fonts/wingding.ttf") # Prints false = only for me

 

puts File.exists?("C:/windows/notepad.exe")

puts File.readable?("C:/windows/notepad.exe")

puts File.executable?("C:/windows/notepad.exe") # Prints false only fo= r me

 

With the 1.9 binaries, File.executable? returns true o= nly if the file extensions is something like .exe. Again, it always returns true f= or the people I have asked.

 

Thanks,

Shri

 

--_000_710DF26F214D2B4BB94287123FFE980A2E1608E94DNAEXMSGC104re_--