forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf71007f
committed
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.com1 parent387803d commitf71007f
1 file changed
+14
-3
lines changedLines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
363 | 363 |
| |
364 | 364 |
| |
365 | 365 |
| |
366 |
| - | |
367 |
| - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
368 | 372 |
| |
369 |
| - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
370 | 381 |
| |
371 | 382 |
| |
372 | 383 |
| |
|
0 commit comments
Comments
(0)