summaryrefslogtreecommitdiff
path: root/libarchive/libarchive.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/libarchive.c')
-rw-r--r--libarchive/libarchive.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libarchive/libarchive.c b/libarchive/libarchive.c
index 13039f2..535d565 100644
--- a/libarchive/libarchive.c
+++ b/libarchive/libarchive.c
@@ -273,6 +273,7 @@ VFSOpenArchive (struct TVFSGlobs *globs, const char *sName)
struct TVFSItem *item;
int r;
char *s;
+ guint64 inode_no;
globs->files = filelist_tree_new ();
globs->vfs_filelist = vfs_filelist_new (globs->files);
@@ -283,6 +284,7 @@ VFSOpenArchive (struct TVFSGlobs *globs, const char *sName)
Result = libarchive_open (&a, globs->archive_path, globs->block_size);
if (Result == cVFS_OK) {
+ inode_no = 0;
for (;;) {
entry = NULL;
r = archive_read_next_header (a, &entry);
@@ -299,12 +301,14 @@ VFSOpenArchive (struct TVFSGlobs *globs, const char *sName)
}
log ("found file: %s, mode = %x\n", archive_entry_pathname (entry), archive_entry_mode (entry));
+ inode_no++;
/* Create a TVFSItem entry and fill all info */
item = g_malloc0 (sizeof (struct TVFSItem));
item->iSize = (guint64) archive_entry_size (entry);
item->iPackedSize = -1; /* no support */
+ item->inode_no = inode_no;
globs->total_size += item->iSize;
item->iMode = archive_entry_mode (entry);
@@ -360,7 +364,7 @@ VFSOpenArchive (struct TVFSGlobs *globs, const char *sName)
}
/* Add item to the global tree and continue with next file */
- filelist_tree_add_item (globs->files, s, item, archive_entry_pathname (entry), 0);
+ filelist_tree_add_item (globs->files, s, item, archive_entry_pathname (entry), inode_no);
g_free (s);
}
archive_read_close (a);