bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/32516] New: gjar may create "." directory into the root o


From: anssi dot hannula at gmail dot com
Subject: [Bug classpath/32516] New: gjar may create "." directory into the root of the archive
Date: 26 Jun 2007 16:45:49 -0000

When specifying the archived file prefixed with './', gjar will actually create
a directory '.' inside the archive and place the file there. This breaks tools,
including gij, as obviously the root should directly contain the classes.
Trying to archive the current directory by using "." is also affected.
This works correctly with sun jar, fastjar, and zip, as seen below:

$ jamvm -Xbootclasspath/p:"$(pwd)/tools/tools.zip" gnu.classpath.tools.jar.Main
-cf classpath.jar ./COPYING
$ /usr/lib/jvm/java-sun/bin/jar -cf sun.jar ./COPYING
$ fastjar -cf sun.jar ./COPYING
$ zip zip.jar ./COPYING
  adding: COPYING (deflated 62%)

$ unzip -l classpath.jar
Archive:  classpath.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
       25  06-26-07 19:02   META-INF/MANIFEST.MF
    17999  06-26-07 19:02   ./COPYING
 --------                   -------
    18024                   2 files
$ unzip -l sun.jar
Archive:  sun.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  06-26-07 19:02   META-INF/
       71  06-26-07 19:02   META-INF/MANIFEST.MF
    17999  07-02-05 23:32   COPYING
 --------                   -------
    18070                   3 files
$ unzip -l fastjar.jar
Archive:  fastjar.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  06-26-07 19:03   META-INF/
       44  06-26-07 19:03   META-INF/MANIFEST.MF
    17999  07-02-05 23:32   COPYING
 --------                   -------
    18043                   3 files
$ unzip -l zip.jar
Archive:  zip.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
    17999  07-02-05 23:32   COPYING
 --------                   -------
    17999                   1 file


-- 
           Summary: gjar may create "." directory into the root of the
                    archive
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anssi dot hannula at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32516





reply via email to

[Prev in Thread] Current Thread [Next in Thread]