"""
return os.path.join(self.basepath, *args)
+ def relpath(self, path):
+ """
+ Does the reverse of path()
+ """
+ return os.path.relpath(path, self.basepath)
+
def url_to(self, url):
"""
Takes a relative URL and makes it absolute
# Add all paths
for path in paths:
- # Make the path relative (again)
- path = os.path.relpath(path, self.basepath)
-
- commandline.append("--include=%s***" % path)
+ commandline.append("--include=%s***" % self.relpath(path))
# Exclude everything that hasn't been included
commandline += ("--include=*/", "--exclude=*")