]> granicus.if.org Git - apache/commitdiff
Don't change the type of the new resource. The provider will update it
authorGreg Stein <gstein@apache.org>
Fri, 2 Nov 2001 19:25:50 +0000 (19:25 +0000)
committerGreg Stein <gstein@apache.org>
Fri, 2 Nov 2001 19:25:50 +0000 (19:25 +0000)
when the copy/move takes place.

Specifically, the new location might imply a different type from the
original, so updating the type is bad mojo. In the observed case, a
resource was copied into a working collection; the type of the new
resource is supposed to be WORKING. Copying the type would be wrong if
the source was REGULAR.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91732 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/mod_dav.c

index 1674e7eb5134719500604c587ac56030a539370f..14388ae4c1a35909dc36b3bc020acd3509b72701 100644 (file)
@@ -2663,14 +2663,6 @@ static int dav_method_copymove(request_rec *r, int is_move)
      */
     resnew_state = dav_get_resource_state(lookup.rnew, resnew);
 
-    /* If destination does not exist, initialize resource object
-     * to be same type as the source.
-     */
-    if (!resnew->exists) {
-        resnew->type = resource->type;
-        resnew->collection = resource->collection;
-    }
-
     /* In a MOVE operation, the destination is replaced by the source.
      * In a COPY operation, if the destination exists, is under version
      * control, and is the same resource type as the source,