mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/spec] expand temporary directory to the real path
It may contain symbolic links.
This commit is contained in:
parent
32e7d9140e
commit
e801e9ba65
1 changed files with 2 additions and 2 deletions
|
@ -6,9 +6,9 @@
|
||||||
SPEC_TEMP_DIR_PID = Process.pid
|
SPEC_TEMP_DIR_PID = Process.pid
|
||||||
SPEC_TEMP_DIR_LIST = []
|
SPEC_TEMP_DIR_LIST = []
|
||||||
if tmpdir = ENV['SPEC_TEMP_DIR']
|
if tmpdir = ENV['SPEC_TEMP_DIR']
|
||||||
temppath = File.expand_path(tmpdir) + "/"
|
temppath = File.realdirpath(tmpdir) + "/"
|
||||||
else
|
else
|
||||||
tmpdir = File.expand_path("rubyspec_temp")
|
tmpdir = File.realdirpath("rubyspec_temp")
|
||||||
temppath = tmpdir + "/#{SPEC_TEMP_DIR_PID}"
|
temppath = tmpdir + "/#{SPEC_TEMP_DIR_PID}"
|
||||||
SPEC_TEMP_DIR_LIST << tmpdir
|
SPEC_TEMP_DIR_LIST << tmpdir
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue