mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01: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