Set the correct filename for uri-list items
This commit is contained in:
parent
7b30364bfd
commit
307717213b
1 changed files with 3 additions and 1 deletions
|
|
@ -4373,8 +4373,10 @@ - (void)draggingSession:(NSDraggingSession *)session
|
|||
UTType *type = [UTType typeWithFilenameExtension:extension];
|
||||
if (!type) type = UTTypeItem;
|
||||
snprintf(buf, sizeof(buf), "kitty-internal/uri-list-item-%d", count);
|
||||
NSString *filename = [url lastPathComponent];
|
||||
GLFWFilePromiseProviderDelegate* delegate = [[[GLFWFilePromiseProviderDelegate alloc]
|
||||
initWithWindow:window mimeType:buf fileName:NULL instanceId:_glfw.drag.instance_id] autorelease];
|
||||
initWithWindow:window mimeType:buf fileName:[filename UTF8String]
|
||||
instanceId:_glfw.drag.instance_id] autorelease];
|
||||
NSFilePromiseProvider *provider = [[[NSFilePromiseProvider alloc]
|
||||
initWithFileType:type.identifier delegate:delegate] autorelease];
|
||||
// Store the delegate in the provider's user info so it's retained
|
||||
|
|
|
|||
Loading…
Reference in a new issue