(cpio_open_cpio_file): restore file offset after read of magic number.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-01-10 11:02:18 +03:00
parent e01a89059b
commit ab2ec1b341

View File

@ -234,7 +234,9 @@ cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super, const vfs_
arch->deferred = NULL; arch->deferred = NULL;
type = get_compression_type (fd, super->name); type = get_compression_type (fd, super->name);
if (type != COMPRESSION_NONE) if (type == COMPRESSION_NONE)
mc_lseek (fd, 0, SEEK_SET);
else
{ {
char *s; char *s;
vfs_path_t *tmp_vpath; vfs_path_t *tmp_vpath;