From 5dee0c03e27ce5645db819a8d2168e8dd53c4ef7 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Thu, 5 Jul 2012 13:00:58 +0100 Subject: [PATCH] Issue #21 unable to access webdav when a subfolder Resolution comes with using path_info in request - to be tested --- app/controllers/dmsf_upload_controller.rb | 2 +- lib/redmine_dmsf/vendor/dav4rack/controller.rb | 1 + lib/redmine_dmsf/webdav/index_resource.rb | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index 22719cbc..28c9bdb9 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -167,7 +167,7 @@ class DmsfUploadController < ApplicationController end end unless files.empty? - files.each {|file| log_activity(file, "uploaded")} + files.each {|file| log_activity(file, "uploaded") unless file.nil?} begin DmsfMailer.files_updated(User.current, files).deliver rescue ActionView::MissingTemplate => e diff --git a/lib/redmine_dmsf/vendor/dav4rack/controller.rb b/lib/redmine_dmsf/vendor/dav4rack/controller.rb index 83b871f3..f2307831 100644 --- a/lib/redmine_dmsf/vendor/dav4rack/controller.rb +++ b/lib/redmine_dmsf/vendor/dav4rack/controller.rb @@ -337,6 +337,7 @@ module DAV4Rack # Returns Resource path with root URI removed def implied_path + return clean_path(@request.path_info.dup) unless @request.path_info.empty? clean_path(@request.path.dup) end diff --git a/lib/redmine_dmsf/webdav/index_resource.rb b/lib/redmine_dmsf/webdav/index_resource.rb index ab367212..20686c2a 100644 --- a/lib/redmine_dmsf/webdav/index_resource.rb +++ b/lib/redmine_dmsf/webdav/index_resource.rb @@ -80,6 +80,11 @@ module RedmineDmsf OK end + # Bugfix: Ensure that this level never indicates a parent + def parent + nil + end + end end end