Commit d0d756b
committed
[5.4] Fix temporary filename coda going above the maximum path length in some cases
This fixes an issue that would occur if the filename for a temporary file plus the .tmp.<coda> suffix was beyond the maximum path limit, but would be fine without it. This limits the temp filename to a maximum of 31 characters.
There will be follow-ups for other situations where long paths have similar issues, but this one specifically is also going to be nominated for 5.4.x and 5.5.
Fixes <https://bugs.swift.org/browse/SR-14823>.1 parent e8478ab commit d0d756b
File tree
2 files changed
+33
-23
lines changed- Sources/Foundation
- Tests/Foundation/Tests
2 files changed
+33
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | | - | |
739 | 738 | | |
740 | 739 | | |
741 | 740 | | |
| |||
760 | 759 | | |
761 | 760 | | |
762 | 761 | | |
763 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
764 | 768 | | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
779 | 784 | | |
780 | 785 | | |
781 | | - | |
782 | | - | |
| 786 | + | |
| 787 | + | |
783 | 788 | | |
784 | 789 | | |
785 | 790 | | |
| |||
802 | 807 | | |
803 | 808 | | |
804 | 809 | | |
| 810 | + | |
805 | 811 | | |
806 | | - | |
| 812 | + | |
807 | 813 | | |
808 | 814 | | |
809 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
492 | | - | |
493 | | - | |
494 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
495 | 498 | | |
496 | | - | |
| 499 | + | |
| 500 | + | |
497 | 501 | | |
498 | 502 | | |
499 | 503 | | |
| |||
0 commit comments