bool can_seek;
int ret;
- can_seek = !(lseek(ctx->wim->in_fd.fd, 0, SEEK_CUR) == (off_t)-1 &&
- errno == ESPIPE);
+ can_seek = (lseek(ctx->wim->in_fd.fd, 0, SEEK_CUR) != -1);
list_for_each_entry(lte, &ctx->stream_list, extraction_list) {
ret = extract_stream_instances(lte, ctx, can_seek);
if (ret)
* output. In that case, "root" should be a single file, not a
* directory tree. (If not, extract_dentry_to_stdout() will
* return an error.) */
- if (extract_flags & WIMLIB_EXTRACT_FLAG_TO_STDOUT &&
- !(extract_flags & WIMLIB_EXTRACT_FLAG_FROM_PIPE)) {
+ if (extract_flags & WIMLIB_EXTRACT_FLAG_TO_STDOUT) {
ret = extract_dentry_to_stdout(root);
goto out_teardown_stream_list;
}
return ret;
/* Make sure there are no streams in the WIM that have not been
- * checksummed yet. Needed at least because 'unhashed_list' aliases
- * 'extraction_list' in `struct wim_lookup_table_entry'. */
+ * checksummed yet. */
ret = wim_checksum_unhashed_streams(wim);
if (ret)
return ret;
extract_flags |= WIMLIB_EXTRACT_FLAG_MULTI_IMAGE;
-#ifdef WITH_NTFS_3G
if (extract_flags & WIMLIB_EXTRACT_FLAG_NTFS) {
ERROR("Cannot extract multiple images in NTFS extraction mode.");
return WIMLIB_ERR_INVALID_PARAM;
}
-#endif
if (tstat(target, &stbuf)) {
if (errno == ENOENT) {