"jar xf" exits with status 0 even if requested file isn't in jar file

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P3
    • None
    • Affects Version/s: 6u18
    • Component/s: tools
    • None
    • jar
    • x86
    • solaris_nevada

      If I try to extract a file that isn't in the jar file, jar(1) fails
      silently: no error message, and the exit status is zero.

      athyra$ jar cf foo.jar foo.pl
      athyra$ jar xf foo.jar no-such-file
      athyra$ echo $?
      0

      Contrast that with the tar command, which complains and exits with a
      non-zero status:

      athyra$ tar cf foo.tar foo.pl
      athyra$ tar xf foo.tar no-such-file
      tar: 1 file(s) not extracted
      athyra$ echo $?
      1

            Assignee:
            Xueming Shen
            Reporter:
            Mike Kupfer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: