Welcome! Log In Create A New Profile

Advanced

[PATCH] fix ngx_realpath() for win32

Won-Kyu Park
November 01, 2022 07:18AM
# HG changeset patch
# User Won-Kyu Park <wkpark@gmail.com>
# Date 1667298839 -32400
# Tue Nov 01 19:33:59 2022 +0900
# Node ID c964b33d60679f5cd8d43a8f859d16c2ac6f89e1
# Parent 1ae25660c0c76edef14121ca64362f28b9d57a70
fix ngx_realpath() for win32

diff -r 1ae25660c0c7 -r c964b33d6067 src/os/win32/ngx_files.c
--- a/src/os/win32/ngx_files.c Wed Oct 19 10:56:21 2022 +0300
+++ b/src/os/win32/ngx_files.c Tue Nov 01 19:33:59 2022 +0900
@@ -416,14 +416,6 @@
}


-u_char *
-ngx_realpath(u_char *path, u_char *resolved)
-{
- /* STUB */
- return path;
-}
-
-
ngx_int_t
ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir)
{
diff -r 1ae25660c0c7 -r c964b33d6067 src/os/win32/ngx_files.h
--- a/src/os/win32/ngx_files.h Wed Oct 19 10:56:21 2022 +0300
+++ b/src/os/win32/ngx_files.h Tue Nov 01 19:33:59 2022 +0900
@@ -172,7 +172,7 @@
void ngx_close_file_mapping(ngx_file_mapping_t *fm);


-u_char *ngx_realpath(u_char *path, u_char *resolved);
+#define ngx_realpath(path, resolved) (u_char *)_fullpath((char
*)(resolved), (char *)(path), MAX_PATH)
#define ngx_realpath_n ""
#define ngx_getcwd(buf, size) GetCurrentDirectory(size, (char *) buf)
#define ngx_getcwd_n "GetCurrentDirectory()"

---- END --------
This small fix would set $realpath_root as expected for win32.
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[PATCH] fix ngx_realpath() for win32

Won-Kyu Park 282 November 01, 2022 07:18AM

Re: [PATCH] fix ngx_realpath() for win32

Maxim Dounin 50 November 01, 2022 11:30AM

Re: [PATCH] fix ngx_realpath() for win32

Won-Kyu Park 50 November 02, 2022 02:46AM

Re: [PATCH] fix ngx_realpath() for win32

Maxim Dounin 64 November 02, 2022 08:16PM



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

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready