mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Use existing time format string to generate backup archive filename (#36469)
This commit is contained in:
@@ -63,7 +63,7 @@ class BackupService < BaseService
|
||||
dump_actor!(zipfile)
|
||||
end
|
||||
|
||||
archive_filename = "#{['archive', Time.now.utc.strftime('%Y%m%d%H%M%S'), SecureRandom.hex(16)].join('-')}.zip"
|
||||
archive_filename = "#{['archive', Time.current.to_fs(:number), SecureRandom.hex(16)].join('-')}.zip"
|
||||
|
||||
@backup.dump = ActionDispatch::Http::UploadedFile.new(tempfile: tmp_file, filename: archive_filename)
|
||||
@backup.processed = true
|
||||
|
||||
Reference in New Issue
Block a user