diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-11-29 13:32:03 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-11-29 13:32:03 +0100 |
| commit | 736d90da1b6cee6333889912513c634d55004d90 (patch) | |
| tree | 020ebaad508bf80f69bce17026d729a26f69f1e4 /libarchive/libarchive.c | |
| parent | ae2be16f015cb0db7c5b6bd1669baaf53be702d1 (diff) | |
| download | tuxcmd-modules-736d90da1b6cee6333889912513c634d55004d90.tar.xz | |
Introduce inode_no property
Diffstat (limited to 'libarchive/libarchive.c')
| -rw-r--r-- | libarchive/libarchive.c | 6 |
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); |
