Mercurial > kallithea
diff rhodecode/controllers/files.py @ 1200:3ecaa17d9dea beta
added os.sep for files controller
updated changelog
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 02 Apr 2011 21:29:50 +0200 |
parents | 0d7a127e6449 |
children | 6832ef664673 |
line wrap: on
line diff
--- a/rhodecode/controllers/files.py Sat Apr 02 21:19:16 2011 +0200 +++ b/rhodecode/controllers/files.py Sat Apr 02 21:29:50 2011 +0200 @@ -25,6 +25,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. +import os import logging import rhodecode.lib.helpers as h @@ -153,7 +154,7 @@ file_node = self.__get_filenode_or_redirect(repo_name, cs, f_path) response.content_disposition = 'attachment; filename=%s' % \ - f_path.split('/')[-1].encode('utf8', 'replace') + f_path.split(os.sep)[-1].encode('utf8', 'replace') response.content_type = file_node.mimetype return file_node.content