Merge pull request #1356 from sk-ys/master

Remove a drive letter when using WebDAV in Windows
This commit is contained in:
Karel Picman 2022-05-17 14:10:54 +02:00 committed by GitHub
commit f415d6c643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,8 @@ module Dav4rack
collection = path.end_with?('/') collection = path.end_with?('/')
path = ::File.expand_path path path = ::File.expand_path path
path << '/' if collection and !path.end_with?('/') path << '/' if collection and !path.end_with?('/')
# remove a drive letter in Windows
path.gsub!(/^([^\/]*)\//, '/')
path path
end end