]> Savannah Git Hosting - gnulib.git/commit
filenamecat: make base a suffix of result
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 14 Jan 2018 21:27:20 +0000 (13:27 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 14 Jan 2018 21:30:37 +0000 (13:30 -0800)
commit935bf3f752b0f6d7643aa0ef789aac5afe66d1b0
treef4951983e2c8da34af13a9937cb9d2c5495b7ad5
parent081f5456c2ce945da96a38139bac67ae126a5904
filenamecat: make base a suffix of result

* lib/filenamecat-lgpl.c (longest_relative_suffix): Remove.
(mfile_name_concat): Always make BASE a suffix of the result, as
cp expects this.  To implement this, separate with '.' instead of
'/' in some rare cases.  Clarify spec to say ./BASE not BASE.
* tests/test-filenamecat.c (main): Adjust tests to match
current behavior.  Check that BASE_IN_RESULT points to
a copy of BASE and is a suffix of the resultk, and that DIR
is a prefix of the result that is no longer than the prefix
indicated by BASE_IN_RESULT.
ChangeLog
lib/filenamecat-lgpl.c
lib/filenamecat.c
tests/test-filenamecat.c