diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-08-15 16:13:16 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-11-19 14:33:26 +0900 |
commit | 4b09ece71d0e8bfc0562d599641a60a46feb8b50 (patch) | |
tree | 89ecffcdc7bd5121d9c2a05d4e5fb3e987f72917 | |
parent | c534c3f1b0fe3bd81ed3d7204d86bd13add52355 (diff) | |
download | gitlab-ce-4b09ece71d0e8bfc0562d599641a60a46feb8b50.tar.gz |
Cleanup codes
-rw-r--r-- | app/uploaders/object_storage.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/uploaders/object_storage.rb b/app/uploaders/object_storage.rb index f80f0d378d7..4e2cd9bc7eb 100644 --- a/app/uploaders/object_storage.rb +++ b/app/uploaders/object_storage.rb @@ -245,13 +245,11 @@ module ObjectStorage end def use_file(&blk) - begin - cache_stored_file! - yield cache_path - ensure - FileUtils.rm_f(cache_path) - cache_storage.delete_dir!(cache_path(nil)) - end + cache_stored_file! + yield cache_path + ensure + FileUtils.rm_f(cache_path) + cache_storage.delete_dir!(cache_path(nil)) end # |