summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 15:10:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 15:10:52 +0000
commit0552020767452da44de2bf5424096f2cb2ea6bf5 (patch)
tree9579d9f0ad3c730c33883130ec23420e80d1c5dc /lib/backup
parente3748b81ca29b24197276767e245158d8f84fda3 (diff)
downloadgitlab-ce-0552020767452da44de2bf5424096f2cb2ea6bf5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/manager.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index 902eb8f6659..a8b3c12a2a2 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -396,13 +396,13 @@ module Backup
timestamp = matched[1].to_i
- if Time.at(timestamp) < (Time.now - keep_time)
- begin
- FileUtils.rm(file)
- removed += 1
- rescue StandardError => e
- puts_time "Deleting #{file} failed: #{e.message}".color(:red)
- end
+ next unless Time.at(timestamp) < (Time.now - keep_time)
+
+ begin
+ FileUtils.rm(file)
+ removed += 1
+ rescue StandardError => e
+ puts_time "Deleting #{file} failed: #{e.message}".color(:red)
end
end
end