Error correctly when the destination parent collection does not exist.

This commit is contained in:
Andrew McMillan 2010-03-24 23:42:28 +13:00
parent 184666892c
commit c3237407df

View File

@ -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') );
}