]> wimlib.net Git - wimlib/blobdiff - src/unix_apply.c
Remove some dead assignments
[wimlib] / src / unix_apply.c
index 8b8d9bf5bf0480a1640d95ff1aaf76e7ac1bf049..4eeee2ca4153511ad8359366a88ce68d8aa5e99d 100644 (file)
@@ -64,7 +64,7 @@ unix_get_supported_features(const char *target,
 }
 
 #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 {
@@ -113,7 +113,7 @@ unix_dentry_path_length(const struct wim_dentry *dentry)
        d = dentry;
        do {
                len += d->d_extraction_name_nchars + 1;
-               d = d->parent;
+               d = d->d_parent;
        } while (!dentry_is_root(d) && will_extract_dentry(d));
 
        return len;
@@ -161,7 +161,7 @@ unix_build_extraction_path(const struct wim_dentry *dentry,
                p -= d->d_extraction_name_nchars;
                memcpy(p, d->d_extraction_name, d->d_extraction_name_nchars);
                *--p = '/';
-               d = d->parent;
+               d = d->d_parent;
        } while (!dentry_is_root(d) && will_extract_dentry(d));
 
        return pathbuf;
@@ -543,6 +543,11 @@ unix_begin_extract_stream_instance(const struct wim_lookup_table_entry *stream,
                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: