Commit 6ac0a142 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Remove unnecessary begin/end

parent 7ce0a61a
......@@ -67,13 +67,11 @@ module Gitlab
end
def with_temp_file(storage_name)
begin
temp_file_path = Dir::Tmpname.create(%w(fs_shards_check +deleted), storage_path(storage_name)) { |path| path }
yield temp_file_path
ensure
delete_test_file(temp_file_path)
end
end
def storage_path(storage_name)
storages_paths&.dig(storage_name, 'path')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment