Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225507

(zipfs): No space left on device not thrown with ZipFileSystem

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      A DESCRIPTION OF THE PROBLEM :
      I save several files in a zip file using Java's FileSystem. If there is not enough disk space I can not get 'java.io.IOException No space left on device' and it behaves as if the zip file were created successfully.

      Here is a snippet from my project:

      Path pathToZip = Paths.get("path/to/existing/zip");

      try(FileSystem fs = FileSystems.newFileSystem(pathToZip, null)) {
          // zip some files via
          Path pathToSomeFile = Paths.get("path/of/some/file/to/be/zipped");
          Files.copy(pathToSomeFile, fs.getPath("/path/of/some/file/to/be/zipped"));
      } catch (IOException ex) {
          log.error("error on zipping files", ex);
      }

      The 'FileSystems.newFileSystem(pathToZip, null)' creates a 'ZipFileSystem' instance. I've debugged up to the method 'sync()' of the class 'ZipFileSystem'. Then, when the 'java.io.IOException No space left on device' occurs, only 'x.printStackTrace()' is called and the exception is gone.


      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              lancea Lance Andersen
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: