Project

General

Profile

Actions

Feature #4712

closed

File.writable? inaccurate in windows

Added by rogerdpack (Roger Pack) about 11 years ago. Updated over 4 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:36228]

Description

Hello. Here's what happens (when a user doesn't have admin privileges in windows 7):

c:\Program Files (x86)\NetBeans 6.9.1>irb --simple-prompt

File.writable?('.')
=> true
File.writable?('./uninstall.exe')
=> true
File.open('./uninstall.exe', 'wb')
Errno::EACCES: Permission denied - ./uninstall.exe
from (irb):4:in initialize' from (irb):4:in open'
from (irb):4

So I think writable was returning true in error here.
Cheers!
-r

Actions

Also available in: Atom PDF