From c3237407df89fead0b06e608d4b0a87217f26c30 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 24 Mar 2010 23:42:28 +1300 Subject: [PATCH] Error correctly when the destination parent collection does not exist. --- inc/caldav-MOVE.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/caldav-MOVE.php b/inc/caldav-MOVE.php index 97802a61..67009f08 100644 --- a/inc/caldav-MOVE.php +++ b/inc/caldav-MOVE.php @@ -34,6 +34,10 @@ if ( $dest->dav_name() == '/' || $dest->IsPrincipal() ) { $dest->NeedPrivilege('DAV::bind'); } +if ( ! $dest->ContainerExists() ) { + $request->DoResponse( 409, translate('Destination collection does not exist') ); +} + if ( ! $request->overwrite && $dest->Exists() ) { $request->DoResponse( 412, translate('Not overwriting existing destination resource') ); }