GNOME Bugzilla – Bug 726254
Downloader does not report progress for non http(s) files
Last modified: 2016-03-31 13:22:07 UTC
Created attachment 271741 [details] [review] downloader: Also report progress for non-http(s) The code in Downloader.download currently contains a FIXME about the missing progress report when the remote_file has a uri scheme != http(s). The attached patch fixes that by just using the ActivityProgress from Downloader.download and updating that in GLib.File.copy_async's FileProgressCallback.
Review of attachment 271741 [details] [review]: Looks good apart from these nitpicks. Some issues & nitpicks about commit log: * "Downloader.download previously just used Boxes.copy_file" That makes it sound like its not the case anymore. * no http(s) -> non-http(s) * The last sentence is redundant, you don't need to describe every detail of your patch. * No need to put every sentence in a new line. Feel free to make use of proper paragraphs though. * No bug link in the commit log? You didn't use git-bz? ::: src/util-app.vala @@ +368,3 @@ + File dest_file, + ActivityProgress progress, + Cancellable? cancellable = null) throws GLib.Error { while args themselves are correctly aligned, you also want to align the identifier names: File src_file, File dest_file, ActivityProgress progress, @@ +371,3 @@ try { debug ("Copying '%s' to '%s'..", src_file.get_path (), dest_file.get_path ()); + yield src_file.copy_async (dest_file, 0, Priority.DEFAULT, cancellable, (cur, total) => { 'current' isn't very long so butter use full word here.
Created attachment 271773 [details] [review] downloader: Also report progress for non-http(s) That should fix all the problems from the patch before. Now *I* don't like the commit message but I didn't know what to change without causing another patch ping-pong. :)
Review of attachment 271773 [details] [review]: looks good