]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
wimboot.c, win32_apply.c: Bracket file by #ifdef __WIN32__
[wimlib] / src / win32_apply.c
index ecd71831d61518819e74426c165b5728d9d0165a..2f169a57dbdcb6ebd9f21a2b6022db974fbc54c5 100644 (file)
@@ -21,6 +21,8 @@
  * along with wimlib; if not, see http://www.gnu.org/licenses/.
  */
 
+#ifdef __WIN32__
+
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
@@ -357,7 +359,7 @@ dentry_extraction_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;  /* No leading slash  */
@@ -426,8 +428,8 @@ build_extraction_path(const struct wim_dentry *dentry,
        ctx->pathbuf.Length = len * sizeof(wchar_t);
        p = ctx->pathbuf.Buffer + len;
        for (d = dentry;
-            !dentry_is_root(d->parent) && will_extract_dentry(d->parent);
-            d = d->parent)
+            !dentry_is_root(d->d_parent) && will_extract_dentry(d->d_parent);
+            d = d->d_parent)
        {
                p -= d->d_extraction_name_nchars;
                wmemcpy(p, d->d_extraction_name, d->d_extraction_name_nchars);
@@ -1359,7 +1361,7 @@ begin_extract_stream_instance(const struct wim_lookup_table_entry *stream,
 
        /* 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;
        }
 
@@ -2079,3 +2081,5 @@ const struct apply_operations win32_apply_ops = {
        .extract                = win32_extract,
        .context_size           = sizeof(struct win32_apply_ctx),
 };
+
+#endif /* __WIN32__ */