Commit 5fc88c5
committed
Replace pgwin32_is_junction() with lstat().
Now that lstat() reports junction points with S_IFLNK/S_ISLINK(), and
unlink() can unlink them, there is no need for conditional code for
Windows in a few places. That was expressed by testing for WIN32 or
S_ISLNK, which we can now constant-fold.
The coding around pgwin32_is_junction() was a bit suspect anyway, as we
never checked for errors, and we also know that errors can be spuriously
reported because of transient sharing violations on this OS. The
lstat()-based code has handling for that.
This also reverts 4fc6b6e on master only. That was done because
lstat() didn't previously work for symlinks (junction points), but now
it does.
Tested-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/CA%2BhUKGLfOOeyZpm5ByVcAt7x5Pn-%3DxGRNCvgiUPVVzjFLtnY0w%40mail.gmail.com1 parent f357233 commit 5fc88c5
File tree
10 files changed
+2
-78
lines changed- src
- backend
- commands
- replication
- storage/file
- utils/adt
- bin
- pg_checksums
- pg_rewind
- common
- include
- port
- port
10 files changed
+2
-78
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
796 | | - | |
| 795 | + | |
797 | 796 | | |
798 | 797 | | |
799 | 798 | | |
| |||
823 | 822 | | |
824 | 823 | | |
825 | 824 | | |
826 | | - | |
827 | 825 | | |
828 | 826 | | |
829 | 827 | | |
| |||
836 | 834 | | |
837 | 835 | | |
838 | 836 | | |
839 | | - | |
840 | 837 | | |
841 | 838 | | |
842 | 839 | | |
| |||
914 | 911 | | |
915 | 912 | | |
916 | 913 | | |
917 | | - | |
918 | 914 | | |
919 | 915 | | |
920 | 916 | | |
| |||
923 | 919 | | |
924 | 920 | | |
925 | 921 | | |
926 | | - | |
927 | 922 | | |
928 | 923 | | |
929 | 924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
| 1325 | + | |
1332 | 1326 | | |
1333 | 1327 | | |
1334 | 1328 | | |
| |||
1798 | 1792 | | |
1799 | 1793 | | |
1800 | 1794 | | |
1801 | | - | |
1802 | 1795 | | |
1803 | | - | |
1804 | | - | |
1805 | | - | |
1806 | 1796 | | |
1807 | 1797 | | |
1808 | 1798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3365 | 3365 | | |
3366 | 3366 | | |
3367 | 3367 | | |
3368 | | - | |
3369 | 3368 | | |
3370 | 3369 | | |
3371 | 3370 | | |
| |||
3377 | 3376 | | |
3378 | 3377 | | |
3379 | 3378 | | |
3380 | | - | |
3381 | | - | |
3382 | | - | |
3383 | | - | |
3384 | 3379 | | |
3385 | 3380 | | |
3386 | 3381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | 286 | | |
288 | | - | |
289 | 287 | | |
290 | 288 | | |
291 | 289 | | |
| |||
314 | 312 | | |
315 | 313 | | |
316 | 314 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | 315 | | |
322 | 316 | | |
323 | 317 | | |
| |||
328 | 322 | | |
329 | 323 | | |
330 | 324 | | |
331 | | - | |
332 | 325 | | |
333 | 326 | | |
334 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | 387 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | 388 | | |
393 | 389 | | |
394 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
435 | 434 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | 435 | | |
440 | 436 | | |
441 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
| |||
459 | 454 | | |
460 | 455 | | |
461 | 456 | | |
462 | | - | |
463 | 457 | | |
464 | 458 | | |
465 | | - | |
466 | 459 | | |
467 | 460 | | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | 461 | | |
485 | 462 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | 365 | | |
0 commit comments