View | Details | Raw Unified | Return to bug 41924
Collapse All | Expand All

(-)src/main/org/apache/tools/tar/TarConstants.java (+6 lines)
Lines 91-96 Link Here
91
    int    DEVLEN = 8;
91
    int    DEVLEN = 8;
92
92
93
    /**
93
    /**
94
     * Length of the Posix prefix field.
95
     * 
96
     */
97
    int    PREFIXLEN = 155;
98
99
    /**
94
     * LF_ constants represent the "link flag" of an entry, or more commonly,
100
     * LF_ constants represent the "link flag" of an entry, or more commonly,
95
     * the "entry type". This is the "old way" of indicating a normal file.
101
     * the "entry type". This is the "old way" of indicating a normal file.
96
     */
102
     */
(-)src/main/org/apache/tools/tar/TarEntry.java (+12 lines)
Lines 71-76 Link Here
71
 * char gname[TGNMLEN];
71
 * char gname[TGNMLEN];
72
 * char devmajor[8];
72
 * char devmajor[8];
73
 * char devminor[8];
73
 * char devminor[8];
74
 * char prefix[PREFIXLEN]; //  name > 100 chars && name <= 255
74
 * } header;
75
 * } header;
75
 * </pre>
76
 * </pre>
76
 *
77
 *
Lines 617-622 Link Here
617
        devMajor = (int) TarUtils.parseOctal(header, offset, DEVLEN);
618
        devMajor = (int) TarUtils.parseOctal(header, offset, DEVLEN);
618
        offset += DEVLEN;
619
        offset += DEVLEN;
619
        devMinor = (int) TarUtils.parseOctal(header, offset, DEVLEN);
620
        devMinor = (int) TarUtils.parseOctal(header, offset, DEVLEN);
621
        offset += DEVLEN; // now at prefix (if any)
622
623
        if (magic.toString().equals(TMAGIC)) {
624
            if (header[offset] != 0) { // there is a prefix
625
                StringBuffer buf = new StringBuffer(PREFIXLEN+1);
626
                buf = TarUtils.parseName(header, offset, PREFIXLEN);
627
                buf.append('/');
628
                buf.append(name);
629
                name = buf;           
630
            }
631
        }
620
    }
632
    }
621
633
622
    /**
634
    /**

Return to bug 41924