Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0RC8

Bug #18700 COPY with depth="0" copies whole collection
Submitted: 2011-07-31 15:33 UTC
From: ralfbecker Assigned:
Status: Open Package: HTTP_WebDAV_Server (version 1.0.0RC6)
PHP Version: Irrelevant OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 6 + 6 = ?

 
 [2011-07-31 15:33 UTC] ralfbecker (Ralf Becker)
Description: ------------ A COPY of an collection with depth="0" copies the whole collection, as it does depth="infinit". Funny coincidence Litmus only checks if the copy succeds, not if it only copies the collection, but not it's content, as RFC 2518: 8.8.3 COPY for Collections states: A COPY of "Depth: 0" only instructs that the collection and its properties but not resources identified by its internal member URIs, are to be copied. The following small patch fixes this bug: Index: egw-pear/HTTP/WebDAV/Server/Filesystem.php ======================================== =========================== --- egw-pear/HTTP/WebDAV/Server/Filesystem.php (Revision 35846) +++ egw-pear/HTTP/WebDAV/Server/Filesystem.php (Arbeitskopie) @@ -701,7 +701,7 @@ WHERE path = '".$options["path"]."'"; mysql_query($query); } else { - if (is_dir($source)) { + if (is_dir($source) && $options["depth"] == "infinity") { // no find for depth="0" $files = System::find($source); $files = array_reverse($files); } else { As states before, Litmus reports no error on that wrong behavior ... Ralf

Comments