build_extraction_path(dentry, ctx);
}
- /* Reparse point? */
- if (unlikely(inode->i_attributes & FILE_ATTRIBUTE_REPARSE_POINT)
- && (stream_name_nchars == 0))
- {
- if (!ctx->common.supported_features.reparse_points)
- return 0;
-
- /* We can't write the reparse stream directly; we must set it
- * with FSCTL_SET_REPARSE_POINT, which requires that all the
- * data be available. So, stage the data in a buffer. */
-
- if (!prepare_data_buffer(ctx, stream->size))
- return WIMLIB_ERR_NOMEM;
- list_add_tail(&dentry->tmp_list, &ctx->reparse_dentries);
- return 0;
- }
/* Encrypted file? */
if (unlikely(inode->i_attributes & FILE_ATTRIBUTE_ENCRYPTED)
return 0;
}
+ /* Reparse point?
+ *
+ * Note: FILE_ATTRIBUTE_REPARSE_POINT is tested *after*
+ * FILE_ATTRIBUTE_ENCRYPTED since the WIM format does not store both EFS
+ * data and reparse data for the same file, and the EFS data takes
+ * precedence. */
+ if (unlikely(inode->i_attributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ && (stream_name_nchars == 0))
+ {
+ if (!ctx->common.supported_features.reparse_points)
+ return 0;
+
+ /* We can't write the reparse stream directly; we must set it
+ * with FSCTL_SET_REPARSE_POINT, which requires that all the
+ * data be available. So, stage the data in a buffer. */
+
+ if (!prepare_data_buffer(ctx, stream->size))
+ return WIMLIB_ERR_NOMEM;
+ list_add_tail(&dentry->tmp_list, &ctx->reparse_dentries);
+ return 0;
+ }
+
if (ctx->num_open_handles == MAX_OPEN_STREAMS) {
/* XXX: Fix this. But because of the checks in
* extract_stream_list(), this can now only happen on a