return WIMLIB_ERR_NTFS_3G;
}
+ if (ctx->num_open_attrs == MAX_OPEN_ATTRS) {
+ ERROR("Can't extract data: too many open files!");
+ return WIMLIB_ERR_UNSUPPORTED;
+ }
+
attr = ntfs_attr_open(ni, AT_DATA, stream_name, stream_name_nchars);
if (!attr) {
ERROR_WITH_ERRNO("Failed to open data stream of \"%s\"",
}
#define NUM_PATHBUFS 2 /* We need 2 when creating hard links */
-#define MAX_OPEN_FDS 1024 /* TODO: Add special case for when the number of
+#define MAX_OPEN_FDS 1000 /* TODO: Add special case for when the number of
identical streams exceeds this number. */
struct unix_apply_ctx {
return 0;
}
+ if (ctx->num_open_fds == MAX_OPEN_FDS) {
+ ERROR("Can't extract data: too many open files!");
+ return WIMLIB_ERR_UNSUPPORTED;
+ }
+
first_dentry = inode_first_extraction_dentry(inode);
first_path = unix_build_extraction_path(first_dentry, ctx);
retry_create:
/* Too many open handles? */
if (ctx->num_open_handles == MAX_OPEN_HANDLES) {
- ERROR("Too many open handles!");
+ ERROR("Can't extract data: too many open files!");
return WIMLIB_ERR_UNSUPPORTED;
}