diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-26 02:11:36 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-26 02:11:36 +0000 |
commit | 0d78333b8ef6f5c5dc22488ca89e19ca7377d7aa (patch) | |
tree | e928d27f4071b02b15fdc559e0e99c55cd906e57 /lib/tmpdir.rb | |
parent | e903ebb335f762db6a0015a7375fb9760bde38db (diff) |
merge revision(s) 19514:
* lib/tmpdir.rb: setup buffer with nul characters instead of spaces.
fixed [ruby-dev:36493]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@21774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tmpdir.rb')
-rw-r--r-- | lib/tmpdir.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb index 7f9fd9a543..50b69ba9ad 100644 --- a/lib/tmpdir.rb +++ b/lib/tmpdir.rb @@ -12,7 +12,7 @@ class Dir require 'Win32API' CSIDL_LOCAL_APPDATA = 0x001c max_pathlen = 260 - windir = ' '*(max_pathlen+1) + windir = "\0"*(max_pathlen+1) begin getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L') raise RuntimeError if getdir.call(0, CSIDL_LOCAL_APPDATA, 0, 0, windir) != 0 |