[llvm] [LIT][Cygwin] Skip pre-check for existence in mkdir-p (PR #163948)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 17 14:16:56 PDT 2025
================
@@ -164,14 +164,7 @@ def mkdir(path):
def mkdir_p(path):
"""mkdir_p(path) - Make the "path" directory, if it does not exist; this
will also make directories for any missing parent directories."""
- if not path or os.path.exists(path):
- return
-
- parent = os.path.dirname(path)
- if parent != path:
- mkdir_p(parent)
-
- mkdir(path)
+ os.makedirs(path, exist_ok=True)
----------------
mstorsjo wrote:
Not sure - do our python script do such path mangling anywhere else?
https://github.com/llvm/llvm-project/pull/163948
More information about the llvm-commits
mailing list