Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-04-26 10:39:56 +0300
committerShinya Maeda <shinya@gitlab.com>2018-04-26 10:39:56 +0300
commit1fb66181db954e529d5da29f747020fac455d14f (patch)
treea4e55ef1ba7865877ecd0a86a3e1dffdd18072dd /app/models/project.rb
parentabde73c0492510a7c6f3d3d412e0971a9df8968d (diff)
parentf819bb7270979cb47a3f5ca97826c9491c983e4d (diff)
Merge branch 'live-trace-v2' into live-trace-v2-efficient-destroy-all
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index eebecb6bd3b..512f16d2f05 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -527,10 +527,6 @@ class Project < ActiveRecord::Base
repository.empty?
end
- def repository_storage_path
- Gitlab.config.repositories.storages[repository_storage]&.legacy_disk_path
- end
-
def team
@team ||= ProjectTeam.new(self)
end
@@ -1114,7 +1110,7 @@ class Project < ActiveRecord::Base
# Check if repository already exists on disk
def check_repository_path_availability
return true if skip_disk_validation
- return false unless repository_storage_path
+ return false unless repository_storage
expires_full_path_cache # we need to clear cache to validate renames correctly
@@ -1919,14 +1915,14 @@ class Project < ActiveRecord::Base
def check_repository_absence!
return if skip_disk_validation
- if repository_storage_path.blank? || repository_with_same_path_already_exists?
+ if repository_storage.blank? || repository_with_same_path_already_exists?
errors.add(:base, 'There is already a repository with that name on disk')
throw :abort
end
end
def repository_with_same_path_already_exists?
- gitlab_shell.exists?(repository_storage_path, "#{disk_path}.git")
+ gitlab_shell.exists?(repository_storage, "#{disk_path}.git")
end
# set last_activity_at to the same as created_at