}
#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:
/* We finally have the symlink data, so we can create
* the symlink. */
const char *path;
+ bool rpfix;
+
+ rpfix = (ctx->common.extract_flags &
+ WIMLIB_EXTRACT_FLAG_RPFIX) &&
+ !inode->i_not_rpfixed;
path = unix_build_inode_extraction_path(inode, ctx);
ret = unix_create_symlink(inode, path,
ctx->reparse_data,
stream->size,
- (ctx->common.extract_flags &
- WIMLIB_EXTRACT_FLAG_RPFIX),
+ rpfix,
ctx->target_abspath,
ctx->target_abspath_nchars);
if (ret) {