##// 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 if c.commit is None:
1181 if c.commit is None:
1182 c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias)
1182 c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias)
1183 c.default_message = (_('Added file via RhodeCode Enterprise'))
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 return self._get_template_context(c)
1186 return self._get_template_context(c)
1187
1187
@@ -1222,6 +1222,10 b' class RepoFilesView(RepoAppView):'
1222 # non posix systems store real file under file attr
1222 # non posix systems store real file under file attr
1223 content = content.file
1223 content = content.file
1224
1224
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:
1225 default_redirect_url = h.route_path(
1229 default_redirect_url = h.route_path(
1226 'repo_commit', repo_name=self.db_repo_name, commit_id='tip')
1230 'repo_commit', repo_name=self.db_repo_name, commit_id='tip')
1227
1231
@@ -1266,6 +1270,7 b' class RepoFilesView(RepoAppView):'
1266 _('Successfully committed new file `{}`').format(
1270 _('Successfully committed new file `{}`').format(
1267 h.escape(node_path)), category='success')
1271 h.escape(node_path)), category='success')
1268 except NonRelativePathError:
1272 except NonRelativePathError:
1273 log.exception('Non Relative path found')
1269 h.flash(_(
1274 h.flash(_(
1270 'The location specified must be a relative path and must not '
1275 'The location specified must be a relative path and must not '
1271 'contain .. in the path'), category='warning')
1276 'contain .. in the path'), category='warning')
General Comments 0
You need to be logged in to leave comments. Login now