summaryrefslogtreecommitdiff
path: root/unpack/restore_fstree.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 13:01:17 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 15:07:34 +0200
commitd92e4dc101bcb6f807accff8c8ecad4030f41afb (patch)
treeb1a10fcac9280b1ff2bdfc75852bc597b67be2e1 /unpack/restore_fstree.c
parent4e017928c7b5b590d2c7e04e42cb497eb3a4f8cf (diff)
Add support for unpacking sparse files as sparse files
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/restore_fstree.c')
-rw-r--r--unpack/restore_fstree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/unpack/restore_fstree.c b/unpack/restore_fstree.c
index 976b15c..ab10f5d 100644
--- a/unpack/restore_fstree.c
+++ b/unpack/restore_fstree.c
@@ -63,7 +63,8 @@ static int create_node(tree_node_t *n, data_reader_t *data, int flags)
return -1;
}
- if (data_reader_dump_file(data, n->data.file, fd)) {
+ if (data_reader_dump_file(data, n->data.file, fd,
+ (flags & UNPACK_NO_SPARSE) == 0)) {
close(fd);
return -1;
}