Actions
Bug #590
closedtmpdir on mswin32
Bug #590:
tmpdir on mswin32
Description
=begin
ささだです.
tmpdir 初期化時,Win32API の SHGetFolderPath でパスを取ってくる
と,末尾に nul が入るため,expand_path が失敗するようです(rstrip し
ても nul は取れない).とりあえず chop してしまったんですが,どうす
るのが良いでしょうか.
Index: lib/tmpdir.rb¶
--- lib/tmpdir.rb (リビジョン 19506)
+++ lib/tmpdir.rb (作業コピー)
@@ -18,7 +16,7 @@
begin
getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L')
raise RuntimeError if getdir.call(0, CSIDL_LOCAL_APPDATA, 0,
0, windir) != 0
-
windir = File.expand_path(windir.rstrip)
-
rescue RuntimeErrorwindir = File.expand_path(windir.rstrip.chop)
begin
getdir = Win32API.new('kernel32',
'GetSystemWindowsDirectory', 'PL', 'L')
--
// SASADA Koichi at atdot dot net
=end
Actions