From 6f556a23dffd79c764ca14dd15ad45dc98555d50 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 27 Apr 2009 13:08:42 +0000 Subject: [PATCH] "remove trailing slash, eg. from webdav" --- phpgwapi/inc/class.vfs_stream_wrapper.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php index e0bb50c003..e1f0cbe12e 100644 --- a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php @@ -692,6 +692,8 @@ class vfs_stream_wrapper implements iface_stream_wrapper { if (self::LOG_LEVEL > 1) error_log(__METHOD__."('$path',$flags,try_create_home=$try_create_home,check_symlink_components=$check_symlink_components)"); + if (substr($path,-1) == '/') $path = substr($path,0,-1); // remove trailing slashes, eg. added by webdav + if (!($url = self::resolve_url($path,!($flags & STREAM_URL_STAT_LINK)))) { if (self::LOG_LEVEL > 0) error_log(__METHOD__."('$path',$flags) can NOT resolve path!");