summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-09-18 11:50:09 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-09-20 12:11:14 +0100
commit0a60698892eb02e7966bc7f48f447b1c1068ba9d (patch)
tree1389cf6209e3c1d52eb4fdbe8a1483dd49e56bb1 /lib/backup
parent5d3f7b133fba9bba876da5ef13c630320a920e3f (diff)
downloadgitlab-ce-0a60698892eb02e7966bc7f48f447b1c1068ba9d.tar.gz
Tighten up remove_old regex from gitlab backup manager.32796-tighten-up-remove-old-while-backing-up-gitlab
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/manager.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index b9a573d3542..f4051c95959 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -79,7 +79,7 @@ module Backup
# - 1495527122_gitlab_backup.tar
# - 1495527068_2017_05_23_gitlab_backup.tar
# - 1495527097_2017_05_23_9.3.0-pre_gitlab_backup.tar
- next unless file =~ /(\d+)(?:_\d{4}_\d{2}_\d{2}(_\d+\.\d+\.\d+.*)?)?_gitlab_backup\.tar$/
+ next unless file =~ /^(\d{10})(?:_\d{4}_\d{2}_\d{2}(_\d+\.\d+\.\d+((-|\.)(pre|rc\d))?)?)?_gitlab_backup\.tar$/
timestamp = $1.to_i