Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

mtree: fix line filename length calculation.

Fixes #301.
Signed-off-by: Andres Mejia <amejia004@gmail.com>
  • Loading branch information...
commit e65bf287f0133426b26611fe3e80b51267987106 1 parent 9caa492
@falconindy falconindy authored amejia1 committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 libarchive/archive_write_set_format_mtree.c
View
4 libarchive/archive_write_set_format_mtree.c
@@ -1855,9 +1855,9 @@ mtree_entry_setup_filenames(struct archive_write *a, struct mtree_entry *file,
return (ret);
}
- /* Make a basename from dirname and slash */
+ /* Make a basename from file->parentdir.s and slash */
*slash = '\0';
- file->parentdir.length = slash - dirname;
+ file->parentdir.length = slash - file->parentdir.s;
archive_strcpy(&(file->basename), slash + 1);
return (ret);
}
Please sign in to comment.
Something went wrong with that request. Please try again.