Use system method to generate temporary file path

This method is not documented, but is used by Dir.mktmpdir.  https://apidock.com/ruby/Dir/Tmpname/create
This commit is contained in:
David Cook
2024-07-09 15:26:07 +10:00
parent ca612282f9
commit 2ab6bcb2e4

View File

@@ -128,9 +128,7 @@ module Admin
end
def mktmpdir
tmpdir = tmpdir_base + SecureRandom.hex(6)
Dir.mkdir(tmpdir)
tmpdir
Dir::Tmpname.create(TMPDIR_PREFIX, Rails.root.join('tmp') ) { |tmpname| Dir.mkdir(tmpname) }
end
def tmpdir_base