Ticket #2297: incremental.patch

File incremental.patch, 1.3 KB (added by tester, 8 years ago)
  • src/vfs/tar/tar.c

    commit d445b8fa1785446b2374b23dafe1a6e69a784689
    Author: Witold Filipczyk <witold.filipczyk@cba.pl>
    Date:   Fri Jan 20 19:05:26 2017 +0100
    
        Show directories from incremental backups
    
    diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c
    index 04e393b5d..408bbb3e1 100644
    a b tar_fill_stat (struct vfs_s_super *archive, struct stat *st, union record *heade 
    387387     * know about the other modes but I think I cause no new 
    388388     * problem when I adjust them, too. -- Norbert. 
    389389     */ 
    390     if (header->header.linkflag == LF_DIR) 
     390    if (header->header.linkflag == LF_DIR || header->header.linkflag == LF_DUMPDIR) 
    391391        st->st_mode |= S_IFDIR; 
    392392    else if (header->header.linkflag == LF_SYMLINK) 
    393393        st->st_mode |= S_IFLNK; 
    tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, int tard, si 
    549549    else 
    550550        *h_size = tar_from_oct (1 + 12, header->header.size); 
    551551 
    552     /* 
    553      * Skip over directory snapshot info records that 
    554      * are stored in incremental tar archives. 
    555      */ 
    556     if (header->header.linkflag == LF_DUMPDIR) 
    557     { 
    558         if (arch->type == TAR_UNKNOWN) 
    559             arch->type = TAR_GNU; 
    560         return STATUS_SUCCESS; 
    561     } 
    562552 
    563553    /* 
    564554     * Skip over pax extended header and global extended