diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-22 01:53:58 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-22 01:53:58 +0000 |
| commit | ec517cf60eb4566ddaf8fe30bb3af4f8c0a28384 (patch) | |
| tree | 3224c7b148d8e7707e2fe1815f39a9a91957b5ae /lib | |
| parent | 2d5ddce2ac8f8b187397743d71bef4c399f83dbe (diff) | |
| download | ruby-ec517cf60eb4566ddaf8fe30bb3af4f8c0a28384.tar.gz ruby-ec517cf60eb4566ddaf8fe30bb3af4f8c0a28384.tar.xz ruby-ec517cf60eb4566ddaf8fe30bb3af4f8c0a28384.zip | |
* lib/tmpdir.rb: remove charcters after "\000" and regularize path.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/tmpdir.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb index 5e8dd6bf3..8a21cdc78 100644 --- a/lib/tmpdir.rb +++ b/lib/tmpdir.rb @@ -9,9 +9,9 @@ class Dir require "Win32API" max_pathlen = 260 t_path = ' '*(max_pathlen+1) - t_path[0, Win32API.new('kernel32', 'GetTempPath', 'LP', 'L').call(t_path.size, t_path)] + t_path = t_path[0, Win32API.new('kernel32', 'GetTempPath', 'LP', 'L').call(t_path.size, t_path)] t_path.untaint - TMPDIR = t_path + TMPDIR = File.expand_path(t_path) rescue LoadError if $SAFE > 0 TMPDIR = '/tmp' |
