build: Fail if a path does not start with a slash

This commit is contained in:
Fatih Aşıcı
2011-02-27 21:10:39 +00:00
parent 0e92a7cc52
commit 064e687697
+6
View File
@@ -735,9 +735,15 @@ class Builder:
for package in self.spec.packages:
for path_info in package.files:
path = os.path.normpath(path_info.path)
if not path.startswith("/"):
raise Error(_("Path must start with a slash: "
"%s") % path_info.path)
if path in paths:
raise Error(_("Multiple 'Path' tags specified "
"for this path: %s") % path_info.path)
paths.append(path)
def check_versioning(self, version, release):