Ensure that the produced prefix exists
@@ -39,6 +39,8 @@ def get_common_parent(paths):
currently embeds Python 3.3.
"""
common_path = os.path.commonprefix([path + '/' for path in paths if path])
+ if not os.path.exists(common_path):
+ common_path = os.path.dirname(common_path)
return common_path.rstrip('/\\')
