aboutsummaryrefslogtreecommitdiff
path: root/src/port/dirmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/dirmod.c')
-rw-r--r--src/port/dirmod.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/port/dirmod.c b/src/port/dirmod.c
index c7fe97c40ff..9731857f6f5 100644
--- a/src/port/dirmod.c
+++ b/src/port/dirmod.c
@@ -206,7 +206,9 @@ pgsymlink(const char *oldpath, const char *newpath)
LPSTR msg;
errno = 0;
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(),
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
(LPSTR) &msg, 0, NULL);
@@ -281,7 +283,9 @@ pgreadlink(const char *path, char *buf, size_t size)
LPSTR msg;
errno = 0;
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(),
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
(LPSTR) &msg, 0, NULL);