From 622d942b6053d60dbfbde4e1df02ef3d3a06a23c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 11 2016 18:25:16 +0000 Subject: Account for namespaces in the path to the git repo --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index ec4890c..09c8442 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1039,10 +1039,14 @@ def new_project(session, user, name, blacklist, allowed_prefix, 'the `/`' ) - gitrepo = os.path.join(gitfolder, '%s.git' % name) + path = name + if namespace: + path = '%s/%s' % (namespace, name) + + gitrepo = os.path.join(gitfolder, '%s.git' % path) if os.path.exists(gitrepo): raise pagure.exceptions.RepoExistsException( - 'The project repo "%s" already exists' % name + 'The project repo "%s" already exists' % path ) project = model.Project(