]> git.kaiwu.me - nginx.git/commitdiff
Dav: changed COPY of a file to preserve access mask.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 31 Jul 2018 23:12:21 +0000 (02:12 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 31 Jul 2018 23:12:21 +0000 (02:12 +0300)
The behaviour is now in line with COPY of a directory with contents,
which preserves access masks on individual files, as well as the "cp"
command.

Requested by Roman Arutyunyan.

src/http/modules/ngx_http_dav_module.c

index 55ad9eb19b1f0ea99c41a30cfe44ee5a6cda5cdd..2d138c15d49897d3d427da14909747cd9c4e20f1 100644 (file)
@@ -845,7 +845,7 @@ overwrite_done:
 
         cf.size = ngx_file_size(&fi);
         cf.buf_size = 0;
-        cf.access = dlcf->access;
+        cf.access = ngx_file_access(&fi);
         cf.time = ngx_file_mtime(&fi);
         cf.log = r->connection->log;