summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 18:06:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 18:06:14 +0000
commitc792263edfaf826c58f4aa41d26904464a17a3e7 (patch)
treeb57ae96c9eeaf0a1432a29f7f50f2fce9529818d /lib/backup
parent6f9edd1a4c4942d3d13ec54793cfae56164b1a0a (diff)
downloadgitlab-ce-c792263edfaf826c58f4aa41d26904464a17a3e7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/manager.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index c0390959269..ce0c4c5d974 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -127,7 +127,7 @@ module Backup
end
tar_file = if ENV['BACKUP'].present?
- "#{ENV['BACKUP']}#{FILE_NAME_SUFFIX}"
+ File.basename(ENV['BACKUP']) + FILE_NAME_SUFFIX
else
backup_file_list.first
end
@@ -235,8 +235,8 @@ module Backup
end
def tar_file
- @tar_file ||= if ENV['BACKUP']
- ENV['BACKUP'] + "#{FILE_NAME_SUFFIX}"
+ @tar_file ||= if ENV['BACKUP'].present?
+ File.basename(ENV['BACKUP']) + FILE_NAME_SUFFIX
else
"#{backup_information[:backup_created_at].strftime('%s_%Y_%m_%d_')}#{backup_information[:gitlab_version]}#{FILE_NAME_SUFFIX}"
end