Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] implemented DAV copy hardlinks
Hello!
On Fri, Oct 19, 2012 at 11:19:14AM +0400, Roman Arutyunyan wrote:
[...]
> @@ -681,6 +682,32 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t
> *cf)
> rc = NGX_ERROR;
> buf = NULL;
> nfd = NGX_INVALID_FILE;
> + fd = NGX_INVALID_FILE;
> +
> +#if !(NGX_WIN32)
> +
Just a side note: тут trailing spaces затесались.
> + if (cf->hardlink) {
> + rc = ngx_hardlink_file(from, to);
> +
> + if (rc == NGX_FILE_ERROR && ngx_errno != NGX_EXDEV) {
> + ngx_log_error(NGX_LOG_CRIT, cf->log, ngx_errno,
> + ngx_hardlink_file_n " \"%s\" to \"%s\" failed",
> + from, to);
> + goto failed;
> + }
Из замеченного при тестировании: при попытке перезаписать файл
получаем 500 из-за EEXIST тут.
[...]
--
Maxim Dounin
http://nginx.com/support.html
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|