mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
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
This commit is contained in:
parent
359d601095
commit
4650036f5a
@ -359,6 +359,9 @@ pgreadlink(const char *path, char *buf, size_t size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* r includes the null terminator */
|
||||
r -= 1;
|
||||
|
||||
/*
|
||||
* If the path starts with "\??\", which it will do in most (all?) cases,
|
||||
* strip those out.
|
||||
|
Loading…
Reference in New Issue
Block a user