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,6 +1222,10 b' class RepoFilesView(RepoAppView):' | |||
|
1222 | 1222 | # non posix systems store real file under file attr |
|
1223 | 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 | 1229 | default_redirect_url = h.route_path( |
|
1226 | 1230 | 'repo_commit', repo_name=self.db_repo_name, commit_id='tip') |
|
1227 | 1231 | |
@@ -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