From 95b39cf6c13f0d203a98779a6cfcf42601405587 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Thu, 8 Mar 2007 19:37:42 +0000 Subject: [PATCH] make sure paths continue to start with a / for some reason os.path.split was loosing the leading / for some of my paths, this tests to see if it was there originally and if it was, makes sure that its still present. --- makelib/osxdist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/makelib/osxdist.py b/makelib/osxdist.py index be6f605..0885a19 100644 --- a/makelib/osxdist.py +++ b/makelib/osxdist.py @@ -62,6 +62,9 @@ def mkdir(path): while head != os.path.sep and len(head) > 0: head, tail = os.path.split(head) path_list.insert(0, tail) + # FIXME: For some reason the above os.path.split lost the root '/' + if path[0] == os.path.sep and path_list[0] != os.path.sep: + path_list.insert(0, os.path.sep) created_path = "" for path_element in path_list: created_path = os.path.join(created_path, path_element) -- 2.30.2