Skip to content

Conversation

@uhonermann
Copy link

Fixes #1320 .

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the existing documentation
  • My changes generate no new warnings
  • I have updated the change log (Add/Change/Fix)
  • I have cleaned up the commit history (use rebase and squash)

Changes proposed in this pull request:

If the FindFiles/WithPattern callback function returns STATUS_MORE_ENTRIES to DispatchDirectoryInformation,
it stores this information into the new BOOLEAN member MoreItems within the DOKAN_OPEN_INFO structure.

Within the next call to DispatchDirectoryInformation, if WriteDirectoryResults returns STATUS_NO_MORE_FILES to signal the end of the list,
and if MoreItems is TRUE, the FindFiles/WithPattern callback function is called again to deliver more items.
Depending on the result of this call, MoreItems is again set to TRUE (STATUS_MORE_ENTRIES) or FALSE (STATUS_SUCCESS).
The WriteDirectoryResults is called again to work on the new items that may have been added to the openInfo->DirList.

This continues until there're no more items in the list, even after the callback.

I also added the BOOLEAN member ForceScan to structure DOKAN_FILE_INFO, that I use to indicate to the callback, that the IRP requests a new scan instead of continuing a former one.
I'm not absolutely sure, if this is really necessary, but since it seems to be a possible situation, I decided to support it.
I'm not absolutely happy with this solution, since it make it necessary to change an exported structure, but I didn't find another way without changing the FindFiles/WithPattern callback or adding a new one.

With this solution, it is not necessary to make any changes to the callback functions, and existing implementations still work without any changes.

For now, I raised the DOKAN_VERSION to 238 in order to be able to check for the new functionality in our callbacks, but of course it would be much better to have it available in an official release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with SaveAs - Dialog unter Windows 11 with Update KB5072033

1 participant