Sergey Kandaurov
March 21, 2023 07:26AM
> On 24 Feb 2023, at 14:40, Sergey Kandaurov <pluknet@nginx.com> wrote:
>
>>
>> On 23 Feb 2023, at 22:46, Maxim Dounin <mdounin@mdounin.ru> wrote:
>>
>> Hello!
>>
>> On Wed, Feb 22, 2023 at 08:01:15PM +0400, Sergey Kandaurov wrote:
>>
>>>> On 19 Feb 2023, at 21:23, Maxim Dounin <mdounin@mdounin.ru> wrote:
>>>>
>>>> Hello!
>>>>
>>>> On Fri, Feb 17, 2023 at 07:17:02PM +0400, Sergey Kandaurov wrote:
>>>>
>>>>>> On 13 Jan 2023, at 01:35, Maxim Dounin <mdounin@mdounin.ru> wrote:
>>>>>>
>>>>>> # HG changeset patch
>>>>>> # User Maxim Dounin <mdounin@mdounin.ru>
>>>>>> # Date 1673549010 -10800
>>>>>> # Thu Jan 12 21:43:30 2023 +0300
>>>>>> # Node ID be7eb9ec28dcbfdfd2e850befc8d051c0e4d46fd
>>>>>> # Parent e62c8e9724ba68a698a2c3613edca73fe4e1c4ae
>>>>>> Win32: fixed ngx_fs_bsize() for symlinks.
>>>>>>
>>>>>> Just a drive letter might not correctly represent file system being used,
>>>>>> notably when using symlinks (as created by "mklink /d"). As such, instead
>>>>>> of calling GetDiskFreeSpace() with just a drive letter, we now always
>>>>>> use GetDiskFreeSpace() with full path.
>>>>>>
>>>>>> diff -r e62c8e9724ba -r be7eb9ec28dc src/os/win32/ngx_files.c
>>>>>> --- a/src/os/win32/ngx_files.c Thu Jan 12 21:43:14 2023 +0300
>>>>>> +++ b/src/os/win32/ngx_files.c Thu Jan 12 21:43:30 2023 +0300
>>>>>> @@ -955,14 +955,8 @@ ngx_directio_off(ngx_fd_t fd)
>>>>>> size_t
>>>>>> ngx_fs_bsize(u_char *name)
>>>>>> {
>>>>>> - u_char root[4];
>>>>>> u_long sc, bs, nfree, ncl;
>>>>>>
>>>>>> - if (name[2] == ':') {
>>>>>> - ngx_cpystrn(root, name, 4);
>>>>>> - name = root;
>>>>>> - }
>>>>>> -
>>>>>
>>>>> BTW, I wonder how this condition could be true.
>>>>> Specifically, what name should represent in order to match.
>>>>> I'm happy that it's leaving though.
>>>>
>>>> I tend to think that this actually never worked, and the original
>>>> intention was to test name[1] instead.
>>>>
>>>> Updated commit log:
>>>>
>>>> : Win32: removed attempt to use a drive letter in ngx_fs_bsize().
>>>> :
>>>> : Just a drive letter might not correctly represent file system being used,
>>>> : notably when using symlinks (as created by "mklink /d"). As such, instead
>>>> : of trying to call GetDiskFreeSpace() with just a drive letter, we now always
>>>> : use GetDiskFreeSpace() with full path.
>>>> :
>>>> : Further, it looks like the code to use just a drive letter never worked,
>>>> : since it tried to test name[2] instead of name[1] to be ':'.
>>>>
>>>> [...]
>>>>
>>>
>>> Looks fine, thanks.
>>
>> Thanks for the review, pushed to http://mdounin.ru/hg/nginx.
>
> Tests for autoindex and dav modules for your consideration.

Pushed, with some cleanup.

--
Sergey Kandaurov
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 00 of 12] win32 non-ASCII names support fixes

Maxim Dounin 819 January 12, 2023 04:40PM

[PATCH 03 of 12] Win32: non-ASCII directory names support in ngx_getcwd()

Maxim Dounin 184 January 12, 2023 04:40PM

Re: [PATCH 03 of 12] Win32: non-ASCII directory names support in ngx_getcwd()

Sergey Kandaurov 117 February 17, 2023 10:04AM

Re: [PATCH 03 of 12] Win32: non-ASCII directory names support in ngx_getcwd()

Maxim Dounin 177 February 19, 2023 12:24PM

Re: [PATCH 03 of 12] Win32: non-ASCII directory names support in ngx_getcwd()

Sergey Kandaurov 112 February 22, 2023 11:02AM

[PATCH 01 of 12] Win32: non-ASCII names support in autoindex (ticket #458)

Maxim Dounin 138 January 12, 2023 04:40PM

Re: [PATCH 01 of 12] Win32: non-ASCII names support in autoindex (ticket #458)

Sergey Kandaurov 126 February 17, 2023 09:40AM

Re: [PATCH 01 of 12] Win32: non-ASCII names support in autoindex (ticket #458)

Maxim Dounin 111 February 19, 2023 12:18PM

Re: [PATCH 01 of 12] Win32: non-ASCII names support in autoindex (ticket #458)

Sergey Kandaurov 117 February 22, 2023 10:40AM

[PATCH 02 of 12] Win32: non-ASCII names support in "include" with wildcards

Maxim Dounin 145 January 12, 2023 04:40PM

Re: [PATCH 02 of 12] Win32: non-ASCII names support in "include" with wildcards

Sergey Kandaurov 141 February 17, 2023 09:54AM

Re: [PATCH 02 of 12] Win32: non-ASCII names support in "include" with wildcards

Maxim Dounin 161 February 19, 2023 12:20PM

Re: [PATCH 02 of 12] Win32: non-ASCII names support in "include" with wildcards

Sergey Kandaurov 120 February 22, 2023 10:50AM

[PATCH 04 of 12] Win32: non-ASCII directory names support in ngx_create_dir()

Maxim Dounin 148 January 12, 2023 04:40PM

Re: [PATCH 04 of 12] Win32: non-ASCII directory names support in ngx_create_dir()

Sergey Kandaurov 136 February 17, 2023 10:14AM

[PATCH 05 of 12] Win32: non-ASCII directory names support in ngx_delete_dir()

Maxim Dounin 126 January 12, 2023 04:40PM

Re: [PATCH 05 of 12] Win32: non-ASCII directory names support in ngx_delete_dir()

Sergey Kandaurov 125 February 17, 2023 10:14AM

[PATCH 06 of 12] Win32: reworked ngx_win32_rename_file() to check errors

Maxim Dounin 152 January 12, 2023 04:40PM

[PATCH 07 of 12] Win32: reworked ngx_win32_rename_file() to use nginx wrappers

Maxim Dounin 123 January 12, 2023 04:40PM

[PATCH 09 of 12] Win32: non-ASCII names support in ngx_rename_file()

Maxim Dounin 170 January 12, 2023 04:40PM

[PATCH 10 of 12] Win32: non-ASCII names support in ngx_open_tempfile()

Maxim Dounin 131 January 12, 2023 04:40PM

[PATCH 08 of 12] Win32: non-ASCII names support in ngx_delete_file()

Maxim Dounin 126 January 12, 2023 04:40PM

[PATCH 12 of 12] Win32: non-ASCII names in ngx_fs_bsize(), ngx_fs_available()

Maxim Dounin 147 January 12, 2023 04:40PM

[PATCH 11 of 12] Win32: fixed ngx_fs_bsize() for symlinks

Maxim Dounin 149 January 12, 2023 04:40PM

Re: [PATCH 11 of 12] Win32: fixed ngx_fs_bsize() for symlinks

Sergey Kandaurov 120 February 17, 2023 10:18AM

Re: [PATCH 11 of 12] Win32: fixed ngx_fs_bsize() for symlinks

Maxim Dounin 123 February 19, 2023 12:24PM

Re: [PATCH 11 of 12] Win32: fixed ngx_fs_bsize() for symlinks

Sergey Kandaurov 114 February 22, 2023 11:02AM

Re: [PATCH 11 of 12] Win32: fixed ngx_fs_bsize() for symlinks

Maxim Dounin 119 February 23, 2023 01:48PM

Re: [PATCH 11 of 12] Win32: fixed ngx_fs_bsize() for symlinks

Sergey Kandaurov 123 February 24, 2023 05:42AM

Re: [PATCH 11 of 12] Win32: fixed ngx_fs_bsize() for symlinks

Sergey Kandaurov 127 March 21, 2023 07:26AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 120
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready