-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing paths when items dropped from archive #14648
Conversation
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I see how this works, but is there any documentation on this? It seems like ~ m a g i c ~ that getting the "FileDrop"
out of a DataPackageView
just so happens to have the value of a HDROP
embedded in the stream. It's just crazy.
Though, https://learn.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.DataTransfer.StandardDataFormats?view=winrt-22621 does list a bunch of other magic strings that seem to return HGLOBAL
s, so I'm not doubting it, I'd just like to have an official reference to point to.
I totally get that and I'll try my best to compile all the resources I've used.
My initial discovery was looking through the data package's Upon finding Then combining these (one) (two) sources, I was able to successfully parse the file paths out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just sprinkled a few const
throughout. Thanks!
@msftbot merge this in 20 minutes |
Hello @carlos-zamora! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
Extracted from PR body: AttachmentsTerminal-14628-before.mp4Terminal-14628-after.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few style notes, otherwise: Thanks so much for doing this!
Hello @DHowett! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about -3619 seconds. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
I had one last drive-by change, as I'd checked the code out to verify my casts/emplaces worked, to reduce another copy. Opportunistic, not required :) Marked for automatic merge and servicing to 1.16. Thanks again! |
Grab all paths from `DROPFILES` struct provided in drag event data `GetStorageItemsAsync()` only giving up to 16 items when items are dropped from any archives - When this occurs, we should look into `FileDrop` key for a stream of the [`DROPFILES struct`](https://learn.microsoft.com/en-us/windows/win32/shell/clipboard#cf_hdrop) - This struct contains a null-character delimited string of paths which we can just read out ## Validation Steps Performed * [X] Unit tests pass locally * [X] Drag and drop paths work for both archives and non-archives files, folders, shortcuts, etc. Closes #14628 (cherry picked from commit b7e537e) Service-Card-Id: 87548939 Service-Version: 1.16
🎉 Handy links: |
🎉 Handy links: |
Grab all paths from
DROPFILES
struct provided in drag event dataGetStorageItemsAsync()
only giving up to 16 items when items are dropped from any archivesFileDrop
key for a stream of theDROPFILES struct
Validation Steps Performed
Closes #14628