Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4719

SnapshotCommand never properly restores archived data-areas

    XMLWordPrintableJSON

Details

    Description

      The RestoreSnapshotRunnable task that is used by SnapshotCommand to restore the data area of a bundle cannot ever work:

      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:                                ^^^^^^
      // ...
      

      Given that target is always a directory, the marked line above will never succeed.

      Attachments

        Issue Links

          Activity

            People

              jajans J.W. Janssen
              jajans J.W. Janssen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: