diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-07-30 11:17:34 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-07-30 11:17:34 +0300 |
commit | baa157926d432f404a41c31ad6514ff8d5366269 (patch) | |
tree | 106b84811dfd7a832fd82300f590dd3763621bc4 /lib/backup/repository.rb | |
parent | c5aae3077335ab0eaafb73f51548d4c85413a1d1 (diff) |
Stricter mkdir's in 'rake gitlab:backup:create'
Diffstat (limited to 'lib/backup/repository.rb')
-rw-r--r-- | lib/backup/repository.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index 36d43d62982..4d70f7883dd 100644 --- a/lib/backup/repository.rb +++ b/lib/backup/repository.rb @@ -130,7 +130,10 @@ module Backup def prepare FileUtils.rm_rf(backup_repos_path) - FileUtils.mkdir_p(backup_repos_path, mode: 0700) + # Ensure the parent dir of backup_repos_path exists + FileUtils.mkdir_p(Gitlab.config.backup.path) + # Fail if somebody raced to create backup_repos_path before us + FileUtils.mkdir(backup_repos_path, mode: 0700) end def silent |