##// END OF EJS Templates
files: fixed few found issues....
dan -
r1972:395809d6 default
parent child Browse files
Show More
@@ -1181,7 +1181,7 b' class RepoFilesView(RepoAppView):'
1181 1181 if c.commit is None:
1182 1182 c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias)
1183 1183 c.default_message = (_('Added file via RhodeCode Enterprise'))
1184 c.f_path = f_path
1184 c.f_path = f_path.lstrip('/') # ensure not relative path
1185 1185
1186 1186 return self._get_template_context(c)
1187 1187
@@ -1222,8 +1222,12 b' class RepoFilesView(RepoAppView):'
1222 1222 # non posix systems store real file under file attr
1223 1223 content = content.file
1224 1224
1225 default_redirect_url = h.route_path(
1226 'repo_commit', repo_name=self.db_repo_name, commit_id='tip')
1225 if self.rhodecode_vcs_repo.is_empty:
1226 default_redirect_url = h.route_path(
1227 'repo_summary', repo_name=self.db_repo_name)
1228 else:
1229 default_redirect_url = h.route_path(
1230 'repo_commit', repo_name=self.db_repo_name, commit_id='tip')
1227 1231
1228 1232 # If there's no commit, redirect to repo summary
1229 1233 if type(c.commit) is EmptyCommit:
@@ -1266,6 +1270,7 b' class RepoFilesView(RepoAppView):'
1266 1270 _('Successfully committed new file `{}`').format(
1267 1271 h.escape(node_path)), category='success')
1268 1272 except NonRelativePathError:
1273 log.exception('Non Relative path found')
1269 1274 h.flash(_(
1270 1275 'The location specified must be a relative path and must not '
1271 1276 'contain .. in the path'), category='warning')
General Comments 0
You need to be logged in to leave comments. Login now