TagArchive: use InputStreamPtr
This commit is contained in:
parent
99a05c56ad
commit
b1d60b5c85
@ -35,11 +35,10 @@ tag_archive_scan(Path path, const TagHandler &handler, void *handler_ctx)
|
|||||||
|
|
||||||
Mutex mutex;
|
Mutex mutex;
|
||||||
Cond cond;
|
Cond cond;
|
||||||
auto *is = OpenArchiveInputStream(path, mutex, cond, IgnoreError());
|
InputStreamPtr is(OpenArchiveInputStream(path, mutex, cond,
|
||||||
if (is == nullptr)
|
IgnoreError()));
|
||||||
|
if (!is)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool result = tag_stream_scan(*is, handler, handler_ctx);
|
return tag_stream_scan(*is, handler, handler_ctx);
|
||||||
delete is;
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user