[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH] setup: Let normalize_path deal with "."
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH] setup: Let normalize_path deal with "." |
Date: |
Fri, 16 Jan 2015 10:46:35 +0100 |
Let function normalize_path handle "." path components. Otherwise
invocations like "quilt setup --sourcedir=. foo.spec" may produce
invalid series files.
---
quilt/setup.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -71,10 +71,11 @@ check_for_existing_files()
return $status
}
-# Resolve ".." in path and clean up double slashes
+# Resolve ".." in path and clean up double slashes and "."
normalize_path()
{
echo "$1" | sed -r -e 's://:/:g' \
+ -e 's:/./:/:g' \
-e ':again' \
-e 's:/[^/]+/\.\.(/|$):\1:g' \
-e 'tagain'
--
Jean Delvare
SUSE L3 Support
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Quilt-dev] [PATCH] setup: Let normalize_path deal with ".",
Jean Delvare <=