diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-24 05:39:39 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-24 05:39:39 +0000 |
commit | cdc5ebd3f2347d04785840c4903ad3d93631cf90 (patch) | |
tree | a62a3794c61d11efe1e3c28d1fe82358ddee59aa /lib/tmpdir.rb | |
parent | ba73253e2bfbcaf4e0d95efcf251e116500992dd (diff) | |
download | ruby-cdc5ebd3f2347d04785840c4903ad3d93631cf90.tar.gz |
* 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/trunk@19513 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 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 |