1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/tmpdir.rb: remove charcters after "\000" and regularize path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2003-07-22 01:53:58 +00:00
parent c26663f24b
commit 8f81d082af
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Tue Jul 22 10:52:19 2003 NAKAMURA Usaku <usa@ruby-lang.org>
* lib/tmpdir.rb: remove charcters after "\000" and regularize path.
Tue Jul 22 02:22:45 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* numeric.c (num_equal): should not use rb_equal().

View file

@ -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'