Add ar --output

Nick Clifton nickc@redhat.com
Thu Nov 7 11:41:00 GMT 2019


Hi Fangrui,

> I believe users need the resolved path (/tmp/c + ../file => /tmp/file;
> /tmp/c + /tmp/file => /tmp/file).  The traditional behavior is to
> extract the file under the current working directory. Users can easily
> predict the output filename.  With --output, users need a second to
> think about the resolved path.  A resolved path will be more useful, I
> think.

Agreed.

I have checked in the attached patch.

Cheers
  Nick

binutils/ChangeLog
2019-11-07  Nick Clifton  <nickc@redhat.com>

	* ar.c (open_output_file): Check for filename validity before
	prefixing with output directory.
	Display the constructed output filename if in verbose mode.
	(extract_file): Let open_output_file display the filename.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ar.patch
Type: text/x-patch
Size: 2866 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20191107/1b8aa031/attachment.bin>


More information about the Binutils mailing list