Skip to content
Snippets Groups Projects

4 0 stable

Closed gitlab-qa-bot requested to merge 4-0-stable into master
3 files
+ 79
20
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 11
2
@@ -51,8 +51,17 @@ class Namespace < ActiveRecord::Base
@@ -51,8 +51,17 @@ class Namespace < ActiveRecord::Base
end
end
def ensure_dir_exist
def ensure_dir_exist
namespace_dir_path = File.join(Gitlab.config.gitolite.repos_path, path)
unless dir_exists?
system("mkdir -m 770 #{namespace_dir_path}") unless File.exists?(namespace_dir_path)
system("mkdir -m 770 #{namespace_full_path}")
 
end
 
end
 
 
def dir_exists?
 
File.exists?(namespace_full_path)
 
end
 
 
def namespace_full_path
 
@namespace_full_path ||= File.join(Gitlab.config.gitolite.repos_path, path)
end
end
def move_dir
def move_dir
Loading