[LEDE-DEV] [PATCH v1 1/1] uclient-fetch: correct filename w/ multple URLs

Felix Fietkau nbd at nbd.name
Thu Nov 2 14:03:42 PDT 2017


On 2017-11-02 19:23, Philip Prindeville wrote:
> From: Philip Prindeville <philipp at redfish-solutions.com>
> 
> When uclient-fetch is called with multiple URL's, it derives the
> first filename based on the URL. When it then handles the 2nd and
> subsequent URLs, it assumes that it was called with a -O filename
> argument as the output file, because it tries to overload the
> variable output_file to mean 2 different things.
> 
> The fix is to use a bool to remember whether we were called with
> an explicit output filename, i.e. with the -O argument, and not
> overload output_file for this purpose.
> 
> Signed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
Thanks for debugging this. I've decided to fix this with a different
approach instead. I've pushed a change that avoids the overloading issue
entirely by renaming the global variable and overwriting a local
variable only.

- Felix



More information about the Lede-dev mailing list