From: André Malo Date: Sun, 14 Mar 2004 16:13:20 +0000 (+0000) Subject: repos.c: In function `dav_fs_copymove_file': X-Git-Tag: pre_ajp_proxy~537 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d651c4a1183faf1dd9b8a6298d1609f49d05470;p=apache repos.c: In function `dav_fs_copymove_file': repos.c:315: warning: `perms' might be used uninitialized in this function git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102953 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c index 01dc4f87f1..fa28d0521c 100644 --- a/modules/dav/fs/repos.c +++ b/modules/dav/fs/repos.c @@ -320,15 +320,14 @@ static dav_error * dav_fs_copymove_file( /* Determine permissions to use for destination */ if (src_finfo && src_finfo->valid & APR_FINFO_PROT && src_finfo->protection & APR_UEXECUTE) { + perms = src_finfo->protection; + if (dst_finfo != NULL) { /* chmod it if it already exist */ - if (apr_file_perms_set(dst, src_finfo->protection)) { + if (apr_file_perms_set(dst, perms)) { return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, "Could not set permissions on destination"); } - } - else { - perms = src_finfo->protection; } } else {