From 45e10753d9583b876f8656a880e92210f54951df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Thu, 5 Mar 2015 15:38:12 +0100 Subject: [PATCH] Cannot open files in utf-8 folders via webdav #299 --- lib/redmine_dmsf/webdav/base_resource.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index f0fde84d..fb2a1437 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -1,7 +1,7 @@ # Redmine plugin for Document Management System "Features" # -# Copyright (C) 2012 Daniel Munn -# Copyright (C) 2011-14 Karel Picman +# Copyright (C) 2012 Daniel Munn +# Copyright (C) 2011-15 Karel Picman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -46,6 +46,16 @@ module RedmineDmsf def special_type nil end + + # Base attribute overriding in order to allow non-ascii characters in path + def path + @path.force_encoding('utf-8') + end + + # Base attribute overriding in order to allow non-ascii characters in path + def public_path + @public_path.force_encoding('utf-8') + end #Generate HTML for Get requests def html_display