You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2012/02/02 14:09:05 UTC
svn commit: r1239596 - /subversion/trunk/subversion/mod_dav_svn/liveprops.c
Author: philip
Date: Thu Feb 2 13:09:05 2012
New Revision: 1239596
URL: http://svn.apache.org/viewvc?rev=1239596&view=rev
Log:
When asked for all liveprops mod_dav_svn should not send "###error###"
as the checksum for a directory.
* subversion/mod_dav_svn/liveprops.c
(insert_prop_internal): Return DAV_PROP_INSERT_NOTSUPP when asked for
the MD5 checksum of a node that is not a file
Modified:
subversion/trunk/subversion/mod_dav_svn/liveprops.c
Modified: subversion/trunk/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/liveprops.c?rev=1239596&r1=1239595&r2=1239596&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/liveprops.c Thu Feb 2 13:09:05 2012
@@ -665,12 +665,16 @@ insert_prop_internal(const dav_resource
|| resource->type == DAV_RESOURCE_TYPE_WORKING
|| resource->type == DAV_RESOURCE_TYPE_VERSION))
{
+ svn_node_kind_t kind;
svn_checksum_t *checksum;
- serr = svn_fs_file_checksum(&checksum, svn_checksum_md5,
- resource->info->root.root,
- resource->info->repos_path, TRUE,
- scratch_pool);
+ serr = svn_fs_check_path(&kind, resource->info->root.root,
+ resource->info->repos_path, scratch_pool);
+ if (!serr && kind == svn_node_file)
+ serr = svn_fs_file_checksum(&checksum, svn_checksum_md5,
+ resource->info->root.root,
+ resource->info->repos_path, TRUE,
+ scratch_pool);
if (serr != NULL)
{
ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err,
@@ -684,6 +688,9 @@ insert_prop_internal(const dav_resource
break;
}
+ if (kind != svn_node_file)
+ return DAV_PROP_INSERT_NOTSUPP;
+
value = svn_checksum_to_cstring(checksum, scratch_pool);
if (! value)