Bug #1263 ยป tmpdir.patch
lib/tmpdir.rb (working copy) | ||
---|---|---|
max_pathlen = 260
|
||
windir = "\0"*(max_pathlen+1)
|
||
begin
|
||
getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L')
|
||
getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L', :stdcall)
|
||
raise RuntimeError if getdir.call(0, CSIDL_LOCAL_APPDATA, 0, 0, windir) != 0
|
||
windir.rstrip!
|
||
rescue RuntimeError
|