From 20b296a621636fbc752a02eff911086fafc97d42 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Thu, 15 Sep 2016 08:01:20 +0100 Subject: [PATCH] Use temporary path in LOOT data folder when cloning If the user's temporary path is on a different drive, boost::filesystem::rename errors (it seems like the WinAPI isn't behaving as described), so don't use the user's temporary path just in case. --- src/backend/helpers/git_helper.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/backend/helpers/git_helper.cpp b/src/backend/helpers/git_helper.cpp index ed227e1e..d72a89cc 100644 --- a/src/backend/helpers/git_helper.cpp +++ b/src/backend/helpers/git_helper.cpp @@ -146,10 +146,7 @@ void GitHelper::Clone(const boost::filesystem::path& path, const std::string& ur // Clone the remote repository. BOOST_LOG_TRIVIAL(info) << "Repository doesn't exist, cloning the remote repository."; - 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()); + fs::path tempPath = path.parent_path() / fs::unique_path(); //Delete temporary folder in case it already exists. fs::remove_all(tempPath);