Commit d9a2665
path_error() uses GetLastError() on Windows, but some os functions
are implemented via CRT APIs which report errors via errno.
This may result in raising OSError with invalid error code (such
as zero).
Introduce posix_path_error() function and use it where appropriate.
(cherry picked from commit 8346031)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
1 parent 75ee130 commit d9a2665
3 files changed
Lines changed: 27 additions & 3 deletions
File tree
- Lib/test
- Misc/NEWS.d/next/Windows
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1582 | 1582 | | |
1583 | 1583 | | |
1584 | 1584 | | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
1585 | 1595 | | |
1586 | 1596 | | |
1587 | 1597 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1340 | 1340 | | |
1341 | 1341 | | |
1342 | 1342 | | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1343 | 1349 | | |
1344 | 1350 | | |
1345 | 1351 | | |
1346 | 1352 | | |
1347 | 1353 | | |
1348 | 1354 | | |
1349 | 1355 | | |
1350 | | - | |
| 1356 | + | |
1351 | 1357 | | |
1352 | 1358 | | |
1353 | 1359 | | |
| |||
1368 | 1374 | | |
1369 | 1375 | | |
1370 | 1376 | | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1371 | 1383 | | |
1372 | 1384 | | |
1373 | 1385 | | |
| |||
5041 | 5053 | | |
5042 | 5054 | | |
5043 | 5055 | | |
5044 | | - | |
| 5056 | + | |
5045 | 5057 | | |
5046 | 5058 | | |
5047 | 5059 | | |
| |||
8770 | 8782 | | |
8771 | 8783 | | |
8772 | 8784 | | |
8773 | | - | |
| 8785 | + | |
8774 | 8786 | | |
8775 | 8787 | | |
8776 | 8788 | | |
| |||
0 commit comments