mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Return display_name from CefDragData::GetFileNames if available
When dropping from Microsoft 365 Outlook the path will be "temp.tmp" while display_name contains the original file name.
This commit is contained in:
parent
eabdf3a2ca
commit
62a9f00bd3
@ -120,8 +120,12 @@ bool CefDragDataImpl::GetFileNames(std::vector<CefString>& names) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::vector<ui::FileInfo>::const_iterator it = data_.filenames.begin();
|
std::vector<ui::FileInfo>::const_iterator it = data_.filenames.begin();
|
||||||
for (; it != data_.filenames.end(); ++it)
|
for (; it != data_.filenames.end(); ++it) {
|
||||||
names.push_back(it->path.value());
|
auto name = it->display_name.value();
|
||||||
|
if (name.empty())
|
||||||
|
name = it->path.value();
|
||||||
|
names.push_back(name);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user