diff options
author | Jean Delvare <jdelvare@suse.de> | 2015-02-04 17:28:47 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2015-02-04 17:28:47 +0100 |
commit | fbaa5d8128e3267dc220f9bed47bbbb953e4ea0e (patch) | |
tree | 8dc9f48437e28c67322904cdcef5a9bba9771033 | |
parent | 0eb66211dbc203cd3c9e706ac43c11b0daa972ec (diff) | |
download | quilt-fbaa5d8128e3267dc220f9bed47bbbb953e4ea0e.tar.gz |
setup: Fix removal of "." components in normalize_path
The code was broken in 3 ways:
* I forgot to escape the "." so it would match any character.
* The g flag is not enough to catch consecutive "." components,
because pattern matches can't overlap.
* A trailing "." component would not be removed.
This fixes commit 3fd706a50b7dbb4f8db6e5db014729db51e6beb0
("setup: Let normalize_path deal with "."".)
-rw-r--r-- | quilt/setup.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/quilt/setup.in b/quilt/setup.in index b87c967..4fed444 100644 --- a/quilt/setup.in +++ b/quilt/setup.in @@ -75,7 +75,7 @@ check_for_existing_files() normalize_path() { echo "$1" | sed -r -e 's://:/:g' \ - -e 's:/./:/:g' \ + -e 's:/\.(/\.)*(/|$):\2:g' \ -e ':again' \ -e 's:/[^/]+/\.\.(/|$):\1:g' \ -e 'tagain' |