Trying to distinguish different "versions" of mtree files was a silly idea.

Submitted by:	Joerg Sonnenberger
This commit is contained in:
Tim Kientzle 2008-09-18 04:13:36 +00:00
parent 4e772e405d
commit a370f3ca73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183134
3 changed files with 2 additions and 4 deletions

View file

@ -247,8 +247,6 @@ typedef int archive_close_callback(struct archive *, void *_client_data);
#define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1)
#define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2)
#define ARCHIVE_FORMAT_MTREE 0x80000
#define ARCHIVE_FORMAT_MTREE_V1 (ARCHIVE_FORMAT_MTREE | 1)
#define ARCHIVE_FORMAT_MTREE_V2 (ARCHIVE_FORMAT_MTREE | 2)
/*-
* Basic outline for reading an archive:

View file

@ -408,7 +408,7 @@ read_mtree(struct archive_read *a, struct mtree *mtree)
struct mtree_entry *last_entry;
int r;
mtree->archive_format = ARCHIVE_FORMAT_MTREE_V1;
mtree->archive_format = ARCHIVE_FORMAT_MTREE;
mtree->archive_format_name = "mtree";
global = NULL;

View file

@ -60,7 +60,7 @@ DEFINE_TEST(test_read_format_mtree)
assertEqualIntA(a, ARCHIVE_OK,
archive_read_open_memory(a, archive, sizeof(archive)));
assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
assertEqualInt(archive_format(a), ARCHIVE_FORMAT_MTREE_V1);
assertEqualInt(archive_format(a), ARCHIVE_FORMAT_MTREE);
assertEqualString(archive_entry_pathname(ae), "file");
assertEqualInt(archive_entry_uid(ae), 18);
assert(S_ISREG(archive_entry_mode(ae)));