make sure paths continue to start with a /
[mussa.git] / makelib / osxdist.py
index be6f605b908b52bc734e5ad2b086a38af15476d1..0885a19cd9150c94c19de08fab18b36542d42211 100644 (file)
@@ -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)