- Notifications
You must be signed in to change notification settings - Fork5k
Commitf4fd532
Fix readlink() for non-PostgreSQL junction points on Windows.
Since commitc5cb8f3 taught stat() to follow symlinks, and since initdbuses pg_mkdir_p(), and that examines parent directories, our humblereadlink() implementation can now be exposed to junction points not ofPostgreSQL origin. Those might be corrupted by our naive path mangling,which doesn't really understand NT paths in general.Simply decline to transform paths that don't look like a drive absolutepath. That means that readlink() returns the NT path directly whenchecking a parent directory of PGDATA that happen to point to a driveusing "rooted" format. That works for the purposes of our stat()emulation.Reported-by: Roman Zharkov <r.zharkov@postgrespro.ru>Reviewed-by: Roman Zharkov <r.zharkov@postgrespro.ru>Discussion:https://postgr.es/m/4590c37927d7b8ee84f9855d83229018%40postgrespro.ruDiscussion:https://postgr.es/m/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.comBackpatched commitf71007f as above by Thomas Munro into releases 13 thru 15Discussion:https://postgr.es/m/CA+hUKGLbnv+pe3q1fYOVkLD3pMra7GuihfMxUN-1831YH9RYQg@mail.gmail.com1 parent9f1c674 commitf4fd532
1 file changed
+14
-3
lines changedLines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
351 | 351 |
| |
352 | 352 |
| |
353 | 353 |
| |
354 |
| - | |
355 |
| - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
356 | 360 |
| |
357 |
| - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
358 | 369 |
| |
359 | 370 |
| |
360 | 371 |
| |
|
0 commit comments
Comments
(0)