diff options
Diffstat (limited to 'lib/tmpdir.rb')
-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 5e8dd6bf35..8a21cdc789 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' |