aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/read_tree.c
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2021-01-13 21:31:00 -0500
committerDavid Oberhollenzer <goliath@infraroot.at>2021-01-15 17:33:09 +0100
commitcd3346a66910f02722e60c6a136405b6e2e4e0fe (patch)
treedb84964217ff0c2ad2b30837469f0b5a31bb3c6e /lib/sqfs/read_tree.c
parent0e3bb2104a8e3fd07e201e6ba99f8d017fdc72a8 (diff)
Fix more normalization of slashes in filenames.
It looks like the last commit missed a couple more occurences where '\' was treated incorrectly. Fixes were still needed in sqfs_dir_reader_find_by_path and sqfs_dir_reader_get_full_hierarchy. This path is used in extras/browse.c.
Diffstat (limited to 'lib/sqfs/read_tree.c')
-rw-r--r--lib/sqfs/read_tree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sqfs/read_tree.c b/lib/sqfs/read_tree.c
index b668ef4..56b4f0c 100644
--- a/lib/sqfs/read_tree.c
+++ b/lib/sqfs/read_tree.c
@@ -214,8 +214,8 @@ int sqfs_dir_reader_get_full_hierarchy(sqfs_dir_reader_t *rd,
inode = NULL;
while (path != NULL && *path != '\0') {
- if (*path == '/' || *path == '\\') {
- while (*path == '/' || *path == '\\')
+ if (*path == '/') {
+ while (*path == '/')
++path;
continue;
}
@@ -226,7 +226,6 @@ int sqfs_dir_reader_get_full_hierarchy(sqfs_dir_reader_t *rd,
ptr = strchr(path, '/');
if (ptr == NULL) {
- ptr = strchr(path, '\\');
if (ptr == NULL) {
for (ptr = path; *ptr != '\0'; ++ptr)