[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils 5.3.0: cp --parents broken
From: |
Andreas Schwab |
Subject: |
Re: coreutils 5.3.0: cp --parents broken |
Date: |
Tue, 25 Jan 2005 12:08:24 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> @@ -78,10 +79,49 @@ path_concat (char const *dir, char const
> p += needs_separator;
>
> if (base_in_result)
> - *base_in_result = p;
> + *base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase);
>
> p = mempcpy (p, base, baselen);
> *p = '\0';
>
> + assert (!base_in_result
> + || strcmp (*base_in_result, abase) == 0);
> +
I think this assertion will trigger if abase starts with multiple slashes,
which are all stripped by longest_relative_suffix.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."