[Win32utils-devel] File.nopen alpha - another followup

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Thu Nov 11 14:22:26 EST 2004

Hi all,

> fh = File.nopen("C:\\temp.txt",File::WRITE_ATTRIBUTES)
> fh.hidden = true
> fh.close
> I get "test.rb:16:in `hidden=': cannot convert nil into 
> String (TypeError)"

It looks like this line is the culprit:

rbPath = rb_funcall(self,rb_intern("path"),0,0);

Hm...we could use GetFullPathName() if rbPath is nil.  That, however,
doesn't deal with the fact that there are probably several other
internal attributes that aren't set if you use nopen().  I suppose I
need to take a look at the open/new implementation in file.c and see
what else it does, and try to imitate it the best I can.


More information about the win32utils-devel mailing list