install: fix relative copies to absolute directory with -D
commit6c65ce4c643b038c61bd332aab5ea87a75117273
authorPádraig Brady <P@draigBrady.com>
Sat, 2 Jan 2016 18:38:37 +0000 (2 18:38 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 3 Jan 2016 12:58:39 +0000 (3 12:58 +0000)
tree76190ad69cfe2f11a9c8b8c5e6a4ac2347887467
parent50a950ba69c2ba8f2300c9e77f67978979537ad5
install: fix relative copies to absolute directory with -D

* src/install.c (mkancesdirs_safe_wd): Unconditionally
restore the current working directory when possibly called
multiple times (from install_file_in_dir()).
* tests/install/create-leading.sh: Add a test case.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/21497
NEWS
src/install.c
tests/install/create-leading.sh