Mercurial > kallithea
changeset 2112:1477e048292e beta
force and check for absolute path on rhodecode setup
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 07 Mar 2012 18:46:06 +0200 |
parents | 122f15a8f6ec |
children | 5a1a07567b18 |
files | rhodecode/lib/db_manage.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/db_manage.py Wed Mar 07 05:26:33 2012 +0200 +++ b/rhodecode/lib/db_manage.py Wed Mar 07 18:46:06 2012 +0200 @@ -376,7 +376,7 @@ if not self.tests and not test_repo_path: path = raw_input( - 'Enter a valid path to store repositories. ' + 'Enter a valid absolute path to store repositories. ' 'All repositories in that path will be added automatically:' ) else: @@ -388,8 +388,12 @@ path_ok = False log.error('Given path %s is not a valid directory' % path) + elif not os.path.isabs(path): + path_ok = False + log.error('Given path %s is not an absolute path' % path) + # check write access - if not os.access(path, os.W_OK) and path_ok: + elif not os.access(path, os.W_OK) and path_ok: path_ok = False log.error('No write permission to given path %s' % path)