From c68efb5e92b6a78461225f039d9195eabdfcb166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 4 Dec 2018 12:57:10 +0100 Subject: [PATCH] Office URI Scheme for direct editing of MS Office files #823 --- app/models/dmsf_folder.rb | 2 +- app/views/dmsf_context_menus/dmsf.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index 414e06ae..21ca2fc5 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -180,7 +180,7 @@ class DmsfFolder < ActiveRecord::Base def dmsf_path_str path = dmsf_path string_path = path.map { |element| element.title } - string_path.join('/') + File.join string_path end def notify? diff --git a/app/views/dmsf_context_menus/dmsf.html.erb b/app/views/dmsf_context_menus/dmsf.html.erb index 5f16341e..220a04f9 100644 --- a/app/views/dmsf_context_menus/dmsf.html.erb +++ b/app/views/dmsf_context_menus/dmsf.html.erb @@ -39,9 +39,9 @@ <% if @file %>
  • <% if @file.last_revision && @file.last_revision.protocol %> - <% url = "#{@file.last_revision.protocol}:ofe|u|#{Setting.protocol.strip}://#{Setting.host_name.strip}/dmsf/webdav/#{Addressable::URI.escape(@file.project.identifier)}/" %> + <% url = "#{@file.last_revision.protocol}:ofe|u|#{Setting.protocol.strip}://#{Setting.host_name.strip}/dmsf/webdav/#{Addressable::URI.escape(RedmineDmsf::Webdav::ProjectResource.create_project_name(@file.project))}/" %> <% if @file.dmsf_folder %> - <% url << @file.dmsf_folder.dmsf_path_str %> + <% url << "#{@file.dmsf_folder.dmsf_path_str}/" %> <% end %> <% url << @file.name %> <% end %>