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 "."".)
---
 quilt/setup.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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'

-- 
Jean Delvare
SUSE L3 Support


_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to