diff options
author | Milo Casagrande <milo@ubuntu.com> | 2013-05-28 14:10:03 +0200 |
---|---|---|
committer | Milo Casagrande <milo@ubuntu.com> | 2013-05-28 14:10:03 +0200 |
commit | ee833f53181969c1c66928fef9c9cc2db1f94f2e (patch) | |
tree | 09f6f6d3c7f9aa3ff0c7902c58f446af97a4a57a | |
parent | 6f3b18e50ea82382f3bef5801593dde3514ac0a9 (diff) |
Moved call to fix_permission: need to be run with each updates.
-rw-r--r-- | rhodecode/model/repo.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py index 5d242ee5..f026618c 100644 --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -350,6 +350,12 @@ class RepoModel(BaseModel): # rename repository self.__rename_repo(old=org_repo_name, new=new_name) + # Linaro changes: + # After moving a repository fix its permission as we need them. + # shutil.move() does not honor all the file system permissions. + new_path = os.path.join(self.repos_path, new_name) + SystemCommand.fix_permissions(new_path) + return cur_repo except Exception: log.error(traceback.format_exc()) @@ -775,10 +781,6 @@ class RepoModel(BaseModel): 'Was trying to rename to already existing dir %s' % new_path ) shutil.move(old_path, new_path) - # Linaro changes: - # After moving a repository fix its permission as we need them. - # shutil.move() does not honor all the file system permissions. - SystemCommand.fix_permissions(new_path) def __delete_repo(self, repo): """ |