Repository navigation
Commit 2e7a4b9
committed
Do not add .ptd files twice when Module::load is retried
Module::load opens the .ptd files it was given and adds each one to its
list of data map loaders as soon as it is open. When opening a later file
fails, or loading one of the data maps fails, the earlier entries stay. A
retried load() then adds them a second time, and merging the data maps
fails with a duplicate key error, even once the missing file exists.
load() now opens every file before it keeps any, forgets the file names
once the files are kept, and rebuilds its list of data maps on each
attempt. So a retry adds each file once. Successful first loads are
unchanged.
This builds on the change that moves the data map code into one helper.1 parent c653379 commit 2e7a4b9
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
369 | | - | |
| 372 | + | |
370 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
371 | 379 | | |
372 | 380 | | |
373 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
646 | 664 | | |
647 | 665 | | |
648 | 666 | | |
| |||
0 commit comments