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
pull/107/head
Thomas Munro 3 years ago
parent 359d601095
commit 4650036f5a
  1. 3
      src/port/dirmod.c

@ -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…
Cancel
Save