Ticket #2297 (closed defect: fixed)
incremental tar archives doesn't contain empty directories
Reported by: | powerman | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.20 |
Component: | mc-vfs | Version: | 4.7.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
Create two tar files with empty dir:
$ mkdir -p dir/dir1; mkdir dir/dir2; touch dir/dir1/file
$ tar cf normal.tar dir/
$ tar cf incremental.tar -g incremental.snap dir/
Now, try to open both (using <Enter> in mc):
normal.tar will contain dir/dir2, incremental.tar will not contain it.
Tested both on 4.7.0.3 and 4.7.3.
Attachments
Change History
comment:2 follow-up: ↓ 3 Changed 14 years ago by andrew_b
Actually, this is a duplicate of 1952. TAR in mc is very old and doesn't support many tar features.
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 14 years ago by powerman
Replying to andrew_b:
Actually, this is a duplicate of 1952. TAR in mc is very old Quote from 1952:
However, I cannot cd#utar or “Enter” them in
I think it's better to disable "Enter" on incremental tar archives too as quick fix/workaround, because otherwise people who unpack such archives using "F5" in mc result in hard to detect issues because of partially unpacked archive.
comment:4 in reply to: ↑ 3 Changed 14 years ago by andrew_b
Replying to powerman:
I think it's better to disable "Enter" on incremental tar archives
It's impossible.
comment:5 Changed 13 years ago by andrew_b
- Branch state set to no branch
- Milestone changed from 4.7 to Future Releases
comment:6 Changed 11 years ago by andrew_b
Ticket #3126 has been marked as a duplicate of this ticket.
comment:8 Changed 8 years ago by andrew_b
I have no idea why [65f99d5493ade37c734cc5c7ff6c8761c8b6901e] was made.
comment:10 Changed 8 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Blocked By 1952 removed
- Milestone changed from Future Releases to 4.8.20
comment:11 Changed 8 years ago by andrew_b
- Branch state changed from no branch to on review
Branch: 2297_incremental_tar_empty_dirs
changeset:c985cf6390c94c9dd029069393fc7ecb753c0394
comment:12 follow-up: ↓ 13 Changed 8 years ago by mooffie
To me the code looks fine.
I inspected a tar file and it seems that LF_DUMPDIR ("D") entries simply replace LF_DIR ("5") ones in such archives. The documentation seems to corroborate this ("LF_DUMPDIR - This represents a directory and a list of files created by the '--incremental' ('-G') option.").
(You also removed the arch->type = TAR_GNU line. This seems rather safe (as there's the magic signature) but since I'm not a tar maven I'll refrain from voting.)
comment:13 in reply to: ↑ 12 Changed 8 years ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
Replying to mooffie:
(You also removed the arch->type = TAR_GNU line. This seems rather safe (as there's the magic signature) but since I'm not a tar maven I'll refrain from voting.)
I restored that.
comment:14 Changed 8 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Blocking 3709 removed
- Branch state changed from approved to merged
Merged to master: [cea097339335ba1615a047240f0913e00b171273].