Content-Length: 259109 | pFad | http://github.com/postgrespro/postgres/commit/4650036f5ab81c93e3b6ed549ef672a325b79705

FA Fix readlink() return value on Windows. · postgrespro/postgres@4650036 · GitHub
Skip to content

Commit 4650036

Browse files
committed
Fix readlink() return value on Windows.
Ancient bug noticed while working on a test suite for these functions. Discussion: https://postgr.es/m/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.com
1 parent 359d601 commit 4650036

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/port/dirmod.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ pgreadlink(const char *path, char *buf, size_t size)
359359
return -1;
360360
}
361361

362+
/* r includes the null terminator */
363+
r -= 1;
364+
362365
/*
363366
* If the path starts with "\??\", which it will do in most (all?) cases,
364367
* strip those out.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/4650036f5ab81c93e3b6ed549ef672a325b79705

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy