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

(-)\apache-ant-1.7.0\src\main\org\apache\tools\ant\taskdefs\Tar.java (-1 / +17 lines)
Lines 90-99 Link Here
90
     */
90
     */
91
    public static final String OMIT = "omit";
91
    public static final String OMIT = "omit";
92
92
93
    private static final String HEADER_OLDGNU = "oldgnu";
94
93
    // CheckStyle:VisibilityModifier OFF - bc
95
    // CheckStyle:VisibilityModifier OFF - bc
94
    File tarFile;
96
    File tarFile;
95
    File baseDir;
97
    File baseDir;
96
98
    private String header;
97
    private TarLongFileMode longFileMode = new TarLongFileMode();
99
    private TarLongFileMode longFileMode = new TarLongFileMode();
98
100
99
    // need to keep the package private version for backwards compatibility
101
    // need to keep the package private version for backwards compatibility
Lines 217-222 Link Here
217
    public void setCompression(TarCompressionMethod mode) {
219
    public void setCompression(TarCompressionMethod mode) {
218
        this.compression = mode;
220
        this.compression = mode;
219
    }
221
    }
222
    /**
223
     * Sets header compatibility mode.
224
     * Allowable values are
225
     * <ul>
226
     * <li>  none - no compatibility mode
227
     * <li>  oldgnu - old Gnu compatibility mode
228
     * </ul>
229
     */
230
    public void setHeader(String header) {
231
      this.header = header;
232
    }
220
233
221
    /**
234
    /**
222
     * do the business
235
     * do the business
Lines 414-419 Link Here
414
427
415
        TarEntry te = new TarEntry(vPath);
428
        TarEntry te = new TarEntry(vPath);
416
        te.setModTime(r.getLastModified());
429
        te.setModTime(r.getLastModified());
430
        if(HEADER_OLDGNU.equals(header)) {
431
          te.setMagic(TarConstants.GNU_TMAGIC);
432
        }
417
        // preserve permissions
433
        // preserve permissions
418
        if (r instanceof ArchiveResource) {
434
        if (r instanceof ArchiveResource) {
419
            ArchiveResource ar = (ArchiveResource) r;
435
            ArchiveResource ar = (ArchiveResource) r;

Return to bug 42500