diff rhodecode/controllers/files.py @ 2255:95800dad44d0 beta

fixes for tests on Windows
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 10 May 2012 20:16:04 +0200
parents 31ebf7010566
children a437a986d399 b872bc10f4ec
line wrap: on
line diff
--- a/rhodecode/controllers/files.py	Thu May 10 19:52:11 2012 +0200
+++ b/rhodecode/controllers/files.py	Thu May 10 20:16:04 2012 +0200
@@ -48,6 +48,7 @@
 
 from rhodecode.model.repo import RepoModel
 from rhodecode.model.scm import ScmModel
+from rhodecode.model.db import Repository
 
 from rhodecode.controllers.changeset import anchor_url, _ignorews_url,\
     _context_url, get_line_ctx, get_ignore_ws
@@ -168,7 +169,7 @@
         file_node = self.__get_filenode_or_redirect(repo_name, cs, f_path)
 
         response.content_disposition = 'attachment; filename=%s' % \
-            safe_str(f_path.split(os.sep)[-1])
+            safe_str(f_path.split(Repository.url_sep())[-1])
 
         response.content_type = file_node.mimetype
         return file_node.content