diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm index 712da37eaef7c..ef1d4f71a8184 100644 --- a/content/browser/web_contents/web_contents_view_mac.mm +++ b/content/browser/web_contents/web_contents_view_mac.mm @@ -647,10 +647,10 @@ bool WebContentsViewMac::DragPromisedFileTo( base::BindOnce(&PromiseWriterHelper, drop_data, std::move(file))); } - // The DragDownloadFile constructor may have altered the value of - // |*out_file_path| if, say, an existing file at the drop site has the same - // name. Return the actual name that was used to write the file. - *out_file_path = file_path; + // |*out_file_path| was updated by CreateFileForDrop() above if an existing + // file at the drop site had the same name. Return that collision-adjusted + // path so the drop target opens the freshly written file, not a pre-existing + // one. return true; }