[pacman-dev] [PATCH] Strip leading "/" from arguments to --overwrite

Joey Pabalinas joeypabalinas at gmail.com
Fri Jun 1 12:09:06 UTC 2018


On Tue May 29 04:28:28 UTC 2018, Allan McRae wrote:
> The arguments for the --overwrite option requried the user to strip the
> leading "/" from the path. It is more intuative to provide the whole
> path and have pacman strip the leading "/" before passing to the
> backend.
> 
> ...
> 
> +	while(i[0] == '/') {
> +		i = i + 1;
> +	}

Eli pointed out that you had already submitted a patch for this
and mine touched a bit too much, and I agree.

I do like your approach more, but I am still of the opinion that
something like:

> i += strspn(i, "/")

would be much simpler (and maintain equivalent semantics) in place of that loop.

-- 
Cheers,
Joey Pabalinas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20180601/f857faae/attachment.asc>


More information about the pacman-dev mailing list