Commit 8656ee0
committed
Fix UnArchiver#isOverwrite not working as expected
Regression in efd980d changed the way
UnArchiver#isOverwrite flag work.
It is indented to indicate that UnArchiver should
always override the existing entries.
efd980d changed it to indicate whether existing file
should be overridden if the entry is newer,
while in this case the file should be always overridden.
This commit returns the old behavior: if the entry
is newer, override the existing file; if the entry
is older, override the existing file only if isOverwrite is true.
Fixes: #2281 parent 57d924b commit 8656ee0
File tree
2 files changed
+25
-32
lines changed- src
- main/java/org/codehaus/plexus/archiver
- test/java/org/codehaus/plexus/archiver
2 files changed
+25
-32
lines changedLines changed: 13 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | | - | |
406 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
407 | 408 | | |
408 | | - | |
| 409 | + | |
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
413 | | - | |
| 414 | + | |
| 415 | + | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
| |||
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
426 | | - | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
| 431 | + | |
445 | 432 | | |
446 | 433 | | |
| 434 | + | |
| 435 | + | |
447 | 436 | | |
448 | 437 | | |
449 | 438 | | |
450 | 439 | | |
451 | | - | |
452 | | - | |
| 440 | + | |
| 441 | + | |
453 | 442 | | |
454 | 443 | | |
455 | 444 | | |
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | | - | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
112 | | - | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
120 | 126 | | |
121 | 127 | | |
122 | 128 | | |
123 | | - | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
135 | 141 | | |
136 | 142 | | |
137 | 143 | | |
138 | | - | |
| 144 | + | |
139 | 145 | | |
140 | | - | |
141 | | - | |
142 | 146 | | |
143 | | - | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
161 | | - | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
0 commit comments