[Webkit-unassigned] [Bug 136372] [GTK] allow overwriting destination of download

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 1 02:10:07 PDT 2014


--- Comment #10 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-09-01 02:10:12 PST ---
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > I'm concerned that we emit the "created-destination" signal after the temporary destination has been created, rather than after the final destination has been created. There doesn't seem to be any way to fix this without violating the documented behavior that it's emitted before "received-data" :/
> > 
> > I guess we could create the destination early, potentially failing if it already exists, leave it empty, and copy over it later. Not sure why that didn't seem obvious to me earlier....
> hmm, you are right, but in that case we would always use G_FILE_COPY_OVERWRITE for g_file_move() and when creating the file in didReceiveResponse() only when allowOverwrite is true. If that fails we would not even create the temporary file. That would also save the race condition of the destination doesn't exist when the download start, but exists when it finishes, and might be overwritten.

See https://bugs.webkit.org/show_bug.cgi?id=136423

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list