Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-788

Exception when getting zip file of an empty dir in workspace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • core
    • None
    • Platform: All, OS: All

      In 1.135, go to workspace, and drill down to an empty directory, click on "(all
      files in zip)" and you'll get a ZipException.

      javax.servlet.ServletException: ZIP file must have at least one entry
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:316)
      org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:240)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:307)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:244)
      org.kohsuke.stapler.Stapler.service(Stapler.java:92)
      javax.servlet.http.HttpServlet.service(Unknown Source)
      hudson.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:79)

      root cause

      java.util.zip.ZipException: ZIP file must have at least one entry
      java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:291)
      java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)
      java.util.zip.ZipOutputStream.close(ZipOutputStream.java:310)
      hudson.FilePath$1.invoke(FilePath.java:184)
      hudson.FilePath$1.invoke(FilePath.java:177)
      hudson.FilePath.act(FilePath.java:280)
      hudson.FilePath.createZipArchive(FilePath.java:177)
      hudson.FilePath.createZipArchive(FilePath.java:218)
      hudson.model.DirectoryBrowserSupport.serveFile(DirectoryBrowserSupport.java:123)
      hudson.model.AbstractProject.doWs(AbstractProject.java:742)
      sun.reflect.GeneratedMethodAccessor547.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:103)
      org.kohsuke.stapler.Function.bindAndinvoke(Function.java:59)
      org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:63)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:307)
      org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:240)

            Unassigned Unassigned
            gmarziou gmarziou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: