From e56a782b89b79f4e1f6f08c632108bc6b4e3ec77 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 9 Mar 2015 19:59:54 +0100 Subject: [PATCH] Bug fix: If iso_write_opts_set_hardlinks() enabled automatic inode numbers, then they did not get into effect with nodes were zisofs decoder filters got attached during the image load process. --- libisofs/stream.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libisofs/stream.c b/libisofs/stream.c index 0bd67ed..aca704b 100644 --- a/libisofs/stream.c +++ b/libisofs/stream.c @@ -943,12 +943,22 @@ ex:; return path; } -/* @return 1 = ok , 0 = not an ISO image stream , <0 = error */ +/* + @param flag bit0= in case of filter stream do not dig for base stream + @return 1 = ok , 0 = not an ISO image stream , <0 = error +*/ int iso_stream_set_image_ino(IsoStream *stream, ino_t ino, int flag) { + IsoStream *base_stream; + if (stream == NULL) { return ISO_NULL_POINTER; } + if (!(flag & 1)) { + base_stream = iso_stream_get_input_stream(stream, 1); + if (base_stream != NULL) + stream = base_stream; + } if (stream->class == &fsrc_stream_class) { FSrcStreamData *fsrc_data = stream->data; fsrc_data->ino_id = ino;