mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user