Closed Bug 463493 Opened 16 years ago Closed 16 years ago

path of x-moz-file flavour on linux is url-encoded

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: pvh, Assigned: pvh)

References

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 1 obsolete file)

Dropping a file into a Mozilla application gets treated specially, creating an nsIFile object which can be accessed through the x-moz-file flavour. Right now, this file's path is created by simply removing the "file://" substring from the beginning of the URL. This is only correct if the path does not contain any URL encoded characters. See widget/gtk2/nsDragService.cpp:478 (or so).
Attachment #346732 - Flags: review?(roc)
Comment on attachment 346732 [details] [diff] [review] create an nsIFileURL instead and get the .file from that. + nsresult rv; + nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv); + nsCOMPtr<nsIURI> fileURI; + rv = ioService->NewURI(NS_ConvertUTF16toUTF8(convertedText), declare rv down where you assign it. Fix that, attach a new patch, carry forward r+sr, then add the checkin-needed keyword to this bug. Thanks!!!
Assignee: nobody → pvh
Component: File Handling → Drag and Drop
Product: Firefox → Core
QA Contact: file.handling → drag-drop
Target Milestone: Firefox 3.1 → ---
Attachment #346732 - Attachment is obsolete: true
Attachment #346737 - Flags: superreview+
Attachment #346737 - Flags: review+
Keywords: checkin-needed
Attachment #346737 - Flags: approval1.9.1b2?
Keywords: checkin-needed
Attachment #346737 - Flags: approval1.9.1b2? → approval1.9.1b2-
Comment on attachment 346737 [details] [diff] [review] patch + nit fixed [Checkin: Comment 5] We'll get this after beta 2.
Comment on attachment 346737 [details] [diff] [review] patch + nit fixed [Checkin: Comment 5] a191=beltzner
Attachment #346737 - Flags: approval1.9.1+
Comment on attachment 346737 [details] [diff] [review] patch + nit fixed [Checkin: Comment 5] http://hg.mozilla.org/mozilla-central/rev/8174339ec32c Please, provide a Hg patch next time.
Attachment #346737 - Attachment description: patch + nit fixed. → patch + nit fixed [Checkin: Comment 5]
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [c-n: baking for 1.9.1]
Target Milestone: --- → mozilla1.9.2a1
Blocks: songbird
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: