diff options
author | Phillip Lougher <phillip@squashfs.org.uk> | 2014-04-20 21:11:09 +0100 |
---|---|---|
committer | Phillip Lougher <phillip@squashfs.org.uk> | 2014-04-20 21:11:09 +0100 |
commit | 689831b1794f19ee0c23c6219a04ae76731c5d62 (patch) | |
tree | 31e098182c891fc65acd8d1ce5606d83f1bf4e1f /squashfs-tools/pseudo.c | |
parent | 70b854132499cd9d9469269599f552ca7da250e1 (diff) | |
download | squashfs-tools-689831b1794f19ee0c23c6219a04ae76731c5d62.tar.gz |
mksquashfs: pseudo files, fix handling of leaf name
If a pathname ended in "/" (i.e. "a/b/c/") the last pathname
component would not be recognised as a leaf name.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Diffstat (limited to 'squashfs-tools/pseudo.c')
-rw-r--r-- | squashfs-tools/pseudo.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c index 84dddd9..c219789 100644 --- a/squashfs-tools/pseudo.c +++ b/squashfs-tools/pseudo.c @@ -81,11 +81,14 @@ static char *get_component(char *target, char **targname) target ++; start = target; - while(*target != '/' && *target!= '\0') + while(*target != '/' && *target != '\0') target ++; *targname = strndup(start, target - start); + while(*target == '/') + target ++; + return target; } |