changeset 3591:2b3a553eaaad beta

don't normalize path if it's empty on adding a file throught web interface
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 26 Mar 2013 12:59:11 +0100
parents 47631be9f449
children 549c73bfc206
files rhodecode/controllers/files.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/files.py	Mon Mar 25 22:51:06 2013 +0100
+++ b/rhodecode/controllers/files.py	Tue Mar 26 12:59:11 2013 +0100
@@ -377,7 +377,8 @@
                           'contain .. in path'), category='warning')
                 return redirect(url('changeset_home', repo_name=c.repo_name,
                                     revision='tip'))
-            location = os.path.normpath(location)
+            if location:
+                location = os.path.normpath(location)
             filename = os.path.basename(filename)
             node_path = os.path.join(location, filename)
             author = self.rhodecode_user.full_contact