From 89114cab05f9ddf27502f2b4738d62b3f508a1e2 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Sat, 23 Oct 2021 17:18:43 -0600 Subject: [PATCH] Fix parent directory creation in *nix --- Wabbajack.Paths.IO/AbsolutePathExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Wabbajack.Paths.IO/AbsolutePathExtensions.cs b/Wabbajack.Paths.IO/AbsolutePathExtensions.cs index e5c80b0f..5ef71f1d 100644 --- a/Wabbajack.Paths.IO/AbsolutePathExtensions.cs +++ b/Wabbajack.Paths.IO/AbsolutePathExtensions.cs @@ -178,6 +178,8 @@ public static class AbsolutePathExtensions public static void CreateDirectory(this AbsolutePath path) { + if (path.Depth > 1 && !path.Parent.DirectoryExists()) + path.Parent.CreateDirectory(); Directory.CreateDirectory(ToNativePath(path)); }