From 09aa8c46bb28d41e942bc2c92d93142b3e5d051c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 30 Apr 2009 07:50:02 +0000 Subject: [PATCH] "fixed failed move or rename via WebDAV (eg. NetDrive on Windows): trailing slashes added to all collections caused a rename to an empty filename --> all training slashes get now removed prior to calling any backend functions" --- phpgwapi/inc/class.vfs_stream_wrapper.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php index b033fcfc13..5b65f84e45 100644 --- a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php @@ -111,6 +111,11 @@ class vfs_stream_wrapper implements iface_stream_wrapper { static $cache = array(); + // remove training slashes eg. added by WebDAV + while(substr($path,-1) == '/' && $path != '/') + { + $path = substr($path,0,-1); + } // we do some caching here if (isset($cache[$path])) {