From 1898d4101cd32c0fc80f0179d5f07c4d85988c4c Mon Sep 17 00:00:00 2001 From: Alexis Lopez Zubieta Date: Wed, 28 Nov 2018 16:12:02 -0600 Subject: [PATCH] Support LSYMLINK and LRAW sqfs file types --- src/libappimage/libappimage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libappimage/libappimage.c b/src/libappimage/libappimage.c index 87963e25..961acf32 100644 --- a/src/libappimage/libappimage.c +++ b/src/libappimage/libappimage.c @@ -428,7 +428,7 @@ bool sqfs_lookup_path_resolving_symlinks(sqfs* fs, char* path, sqfs_inode* inode // Save visited inode numbers to prevent loops GSList* inodes_visited = g_slist_append(NULL, (gpointer) inode->base.inode_number); - while (inode->base.inode_type == SQUASHFS_SYMLINK_TYPE) { + while (inode->base.inode_type == SQUASHFS_SYMLINK_TYPE || inode->base.inode_type == SQUASHFS_LSYMLINK_TYPE) { // Read symlink size_t size; // read twice, once to find out right amount of memory to allocate @@ -580,7 +580,7 @@ gboolean g_key_file_load_from_squash(sqfs* fs, char* path, GKeyFile* key_file_st return false; gboolean success = false; - if (inode.base.inode_type == SQUASHFS_REG_TYPE) { + if (inode.base.inode_type == SQUASHFS_REG_TYPE || inode.base.inode_type == SQUASHFS_LREG_TYPE ) { char* buf = NULL; off_t buf_size; sqfs_read_regular_inode(fs, &inode, &buf, &buf_size);