mtree adds ./ to every file that is being written to the archive, but
that is not very useful for us.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
pakfire_file_set_abspath(file, archive_entry_sourcepath(entry));
// Set path
- pakfire_file_set_path(file, archive_entry_pathname(entry));
+ const char* path = archive_entry_pathname(entry);
+ if (path) {
+ // Strip any leading dots from paths
+ if (pakfire_string_startswith(path, "./"))
+ path++;
+
+ pakfire_file_set_path(file, path);
+ }
// Set size
pakfire_file_set_size(file, archive_entry_size(entry));