You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "J.W. Janssen (JIRA)" <ji...@apache.org> on 2014/12/05 10:21:13 UTC
[jira] [Resolved] (FELIX-4719) SnapshotCommand never properly
restores archived data-areas
[ https://issues.apache.org/jira/browse/FELIX-4719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
J.W. Janssen resolved FELIX-4719.
---------------------------------
Resolution: Fixed
Fixed in rev #1643202.
> 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
> Fix For: deploymentadmin-0.9.8
>
>
> 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)