Method: Bcms::WebDAV::Resource#public_path

Defined in:
lib/bcms_webdav/resource.rb

#public_pathObject

Ensures path is encoded. In most cases, an encoded path may occur after uploading a file (PUT) with special characters in it.



161
162
163
164
165
166
167
168
169
# File 'lib/bcms_webdav/resource.rb', line 161

def public_path
  p = super
  begin
    URI(p)
  rescue URI::InvalidURIError
    return URI.escape(p)
  end
  p
end