J.W. Janssen created FELIX-4719:
-----------------------------------
Summary: SnapshotCommand never properly restores archived
data-areas
Key: FELIX-4719
URL: https://issues.apache.org/jira/browse/FELIX-4719
Project: Felix
Issue Type: Bug
Components: Deployment Admin
Reporter: J.W. Janssen
Assignee: J.W. Janssen
The {{RestoreSnapshotRunnable}} task that is used by {{SnapshotCommand}} to
restore the data area of a bundle cannot ever work:
{code}
private void unpack(File source, File target) throws IOException {
ZipInputStream input = null;
try {
input = new ZipInputStream(new FileInputStream(source));
for (ZipEntry entry = input.getNextEntry(); entry != null; entry =
input.getNextEntry()) {
if (entry.isDirectory()) {
(new File(target, entry.getName())).mkdirs();
} else {
OutputStream output = null;
try {
output = new FileOutputStream(target);
// THIS: ^^^^^^
// ...
{code}
Given that {{target}} is *always* a directory, the marked line above will never
succeed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)