summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-26 02:12:10 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-26 02:12:10 +0000
commitfade72eec9ee6fd11245bd097af02adadb3c7639 (patch)
tree44462a9fd4751c6789c1b2f65745862b97fe77fb /lib
parent20178fc002419a3e3673025d1d3637a35e0b4465 (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_7@21776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/tmpdir.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb
index 2e82aa528e..bcd66ab424 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -14,7 +14,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