From d74b0925001b8bedc999c950a3cb8285bd816c67 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 12 Jul 2016 18:47:01 +0100 Subject: [PATCH] Fix error when creating a temporary folder Try to create the user's temporary directory, in case it doesn't already exist. No test for this since it's in reaction to external system config that's out of LOOT's control. Fixes #561. --- src/backend/helpers/git_helper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/helpers/git_helper.cpp b/src/backend/helpers/git_helper.cpp index 53e9baa0..d527d854 100644 --- a/src/backend/helpers/git_helper.cpp +++ b/src/backend/helpers/git_helper.cpp @@ -166,6 +166,9 @@ namespace loot { fs::path tempPath = fs::temp_directory_path() / fs::unique_path(); + // Create the temporary parent folder in case it doesn't already exist. + fs::create_directories(tempPath.parent_path()); + //Delete temporary folder in case it already exists. fs::remove_all(tempPath);