X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fwin32_capture.c;h=ad40d45287af5828cf6528e6f3cf77e2e39b8139;hb=32614c9f026be20f0336df3053b91090dc53297f;hp=08a0654f812ac18573a3b22b049962998bd3c41a;hpb=9d38cdb02481552e1f3c7f56181623b2b60fe857;p=wimlib diff --git a/src/win32_capture.c b/src/win32_capture.c index 08a0654f..ad40d452 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -888,6 +888,9 @@ winnt_scan_stream(const wchar_t *path, size_t path_nchars, sizeof(wchar_t)); if (!ads_entry) return WIMLIB_ERR_NOMEM; + } else if (inode->i_attributes & FILE_ATTRIBUTE_REPARSE_POINT) { + /* Ignore unnamed data stream of reparse point */ + return 0; } else { ads_entry = NULL; } @@ -1415,18 +1418,19 @@ win32_build_dentry_tree(struct wim_dentry **root_ret, { ERROR("\"%ls\": unrecognized path format", root_disk_path); ret = WIMLIB_ERR_INVALID_PARAM; - goto out_free_path; - } - - ntpath_nchars = ntpath.Length / sizeof(wchar_t); - wmemcpy(path, ntpath.Buffer, ntpath_nchars); - path[ntpath_nchars] = L'\0'; - - params->capture_root_nchars = ntpath_nchars; - if (path[ntpath_nchars - 1] == L'\\') - params->capture_root_nchars--; + } else { + ntpath_nchars = ntpath.Length / sizeof(wchar_t); + wmemcpy(path, ntpath.Buffer, ntpath_nchars); + path[ntpath_nchars] = L'\0'; + params->capture_root_nchars = ntpath_nchars; + if (path[ntpath_nchars - 1] == L'\\') + params->capture_root_nchars--; + ret = 0; + } HeapFree(GetProcessHeap(), 0, ntpath.Buffer); + if (ret) + goto out_free_path; memset(&stats, 0, sizeof(stats));