Commit 2d098aa
committed
builder: Make add_pax() return an error in GNU mode
Previously, add_pax() accepted calls regardless of ExtensionMode but
finish() only emitted PAX records in Pax mode -- silently discarding
any PAX data added in Gnu mode. The doc comment incorrectly claimed
PAX extensions would be emitted regardless of mode.
Return HeaderError::IncompatibleMode instead, so callers get a clear
error rather than quietly losing xattrs or other PAX metadata.
This is a breaking API change: add_pax() now returns Result<&mut Self>
instead of &mut Self.
Assisted-by: OpenCode (Claude Opus 4)
Signed-off-by: Colin Walters <walters@verbum.org>1 parent 62ee267 commit 2d098aa
3 files changed
Lines changed: 72 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| |||
292 | 294 | | |
293 | 295 | | |
294 | 296 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
299 | 303 | | |
300 | 304 | | |
301 | 305 | | |
| |||
512 | 516 | | |
513 | 517 | | |
514 | 518 | | |
515 | | - | |
| 519 | + | |
516 | 520 | | |
517 | 521 | | |
518 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | | - | |
867 | | - | |
868 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
869 | 881 | | |
870 | | - | |
| 882 | + | |
871 | 883 | | |
872 | 884 | | |
873 | 885 | | |
| |||
1861 | 1873 | | |
1862 | 1874 | | |
1863 | 1875 | | |
| 1876 | + | |
1864 | 1877 | | |
1865 | 1878 | | |
1866 | 1879 | | |
| |||
1876 | 1889 | | |
1877 | 1890 | | |
1878 | 1891 | | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
1879 | 1926 | | |
1880 | 1927 | | |
1881 | 1928 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| |||
4103 | 4112 | | |
4104 | 4113 | | |
4105 | 4114 | | |
4106 | | - | |
| 4115 | + | |
| 4116 | + | |
4107 | 4117 | | |
4108 | 4118 | | |
4109 | 4119 | | |
| |||
0 commit comments