X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwin32_capture.c;h=88e31248621119b7a0e176329bfca6933c5afdc5;hp=db2ea0ec7a8afa4a5513abd14730f89da6cd9330;hb=21da2526eff64cdb8e3cb509d34af182d764c701;hpb=e925fcc4f725864e7bc8dc3dac3812480a1fe56d diff --git a/src/win32_capture.c b/src/win32_capture.c index db2ea0ec..88e31248 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -248,11 +248,11 @@ winnt_get_short_name(HANDLE h, struct wim_dentry *dentry) FileAlternateNameInformation); info = (const FILE_NAME_INFORMATION *)buf; if (NT_SUCCESS(status) && info->FileNameLength != 0) { - dentry->short_name = utf16le_dupz(info->FileName, - info->FileNameLength); - if (!dentry->short_name) + dentry->d_short_name = utf16le_dupz(info->FileName, + info->FileNameLength); + if (!dentry->d_short_name) return STATUS_NO_MEMORY; - dentry->short_name_nbytes = info->FileNameLength; + dentry->d_short_name_nbytes = info->FileNameLength; } return status; } @@ -415,9 +415,8 @@ winnt_recurse_directory(HANDLE h, { const FILE_NAMES_INFORMATION *info = buf; for (;;) { - if (!(info->FileNameLength == 2 && info->FileName[0] == L'.') && - !(info->FileNameLength == 4 && info->FileName[0] == L'.' && - info->FileName[1] == L'.')) + if (!should_ignore_filename(info->FileName, + info->FileNameLength / 2)) { wchar_t *p; wchar_t *filename; @@ -450,8 +449,7 @@ winnt_recurse_directory(HANDLE h, if (ret) goto out_free_buf; - if (child) - dentry_add_child(parent, child); + attach_scanned_tree(parent, child, params->blob_table); } if (info->NextEntryOffset == 0) break; @@ -630,7 +628,7 @@ winnt_try_rpfix(struct reparse_buffer_disk *rpbuf, u16 *rpbuflen_p, * SYMBOLIC_LINK_RELATIVE. We will use this information, although this * may not always do what the user expects, since drive-relative * symbolic links such as "\Users\Public" have SYMBOLIC_LINK_RELATIVE - * set, in addition to truely relative symbolic links such as "Users" or + * set, in addition to truly relative symbolic links such as "Users" or * "Users\Public". However, WIMGAPI (as of Windows 8.1) has this same * behavior. * @@ -744,6 +742,8 @@ winnt_load_reparse_data(HANDLE h, struct wim_inode *inode, } inode->i_reparse_tag = le32_to_cpu(rpbuf.rptag); + inode->i_rp_reserved = le16_to_cpu(rpbuf.rpreserved); + if (!inode_add_stream_with_data(inode, STREAM_TYPE_REPARSE_POINT, NO_STREAM_NAME, @@ -1208,10 +1208,10 @@ winnt_build_dentry_tree_recursive(struct wim_dentry **root_ret, ACCESS_MASK requestedPerms; u64 sort_key; - ret = try_exclude(full_path, full_path_nchars, params); - if (ret < 0) /* Excluded? */ + ret = try_exclude(full_path, params); + if (unlikely(ret < 0)) /* Excluded? */ goto out_progress; - if (ret > 0) /* Error? */ + if (unlikely(ret > 0)) /* Error? */ goto out; /* Open the file. */ @@ -1290,8 +1290,7 @@ retry_open: filename, file_info.ino, params->capture_root_dev, - (file_info.num_links <= 1 || - (file_info.attributes & FILE_ATTRIBUTE_DIRECTORY)), + (file_info.num_links <= 1), &root); if (ret) goto out;