- return 0;
-}
-
-/* Set security descriptor and extract stream data or reparse data (skip the
- * unnamed data stream of encrypted files, which was already extracted). */
-static int
-win32_finish_extract_stream(HANDLE h, const struct wim_dentry *dentry,
- const struct wim_lookup_table_entry *lte,
- const wchar_t *stream_path,
- const wchar_t *stream_name_utf16,
- struct apply_args *args)
-{
- int ret = 0;
- const struct wim_inode *inode = dentry->d_inode;
- if (stream_name_utf16 == NULL) {
- /* Unnamed stream. */
-
- /* Handle reparse points. The data for them needs to be set
- * using a special ioctl. Note that the reparse point may have
- * been created using CreateFileW() in the case of
- * non-directories or CreateDirectoryW() in the case of
- * directories; but the ioctl works either way. Also, it is
- * only this step that actually sets the
- * FILE_ATTRIBUTE_REPARSE_POINT, as it is not valid to set it
- * using SetFileAttributesW() or CreateFileW().
- *
- * If the volume does not support reparse points we simply
- * ignore the reparse data. (N.B. the code currently doesn't
- * actually reach this case because reparse points are skipped
- * entirely on such volumes.) */
- if (inode->i_attributes & FILE_ATTRIBUTE_REPARSE_POINT) {
- if (args->vol_flags & FILE_SUPPORTS_REPARSE_POINTS) {
- ret = win32_set_reparse_data(h, inode,
- lte, stream_path,
- args);
- if (ret)
- return ret;
- } else {
- DEBUG("Cannot set reparse data on \"%ls\": volume "
- "does not support reparse points", stream_path);
- }
- } else if (lte != NULL &&
- !(args->vol_flags & FILE_SUPPORTS_ENCRYPTION &&
- inode->i_attributes & FILE_ATTRIBUTE_ENCRYPTED))
- {
- /* Extract the data of the unnamed stream, unless the
- * lookup table entry is NULL (indicating an empty
- * stream for which no data needs to be extracted), or
- * the stream is encrypted and therefore was already
- * extracted as a special case. */
- ret = do_win32_extract_stream(h, lte);
- if (ret)
- return ret;
- }